Hi I am new to QT creator. I have tried a bunch of things to set my background image for the Q mainwindow. I added a resource folder with my image. I tried to add the by usi
The CSS style background will be inherited in the child widgets and thus create weird looking windows. A possible solution is to limit the background to MainWindow or #centralWidget. If, additionally, you want to stretch the image to cover the full widget, use this kind of CSS
this->setStyleSheet(
"#centralWidget { "
" border-image: url(:/background.png) 0 0 0 0 stretch stretch;"
"}");