Background Image in qss? [SOLVED}
How can I set the background image for all of the screens in my application in the qss stylesheet file? Is it possible?
Hi just apply the stylesheet to your QApplication instance.This "link.":http://www.qtcentre.org/threads/12454-how-to-apply-stylesheet-defined-in-qss-file-to-qt-application should help
Sorry, I should have been more explicit.
I have applied my stylesheet in the main.c and that works for buttons & other widgets throughout my application. Now, I wonder can I place code in the stylesheet to load the screen background?
My question is, how can I do something like this in a stylesheet:-
@ setStyleSheet("background-image: url(:/logo/MMbgTest4.jpg);");
If i understood you correctly, you want to apply a background to your mainwindow .Just apply the style sheet to whatever widget is your mainWindow.This "thread":http://qt-project.org/forums/viewthread/1397 has something similar to what you want.
I wanted to be able to set the the background to all screens in my application and the following added to the .qss file works.
Thanks for your help.