I have a simple Qt GUI application and am having problems adjusting the background of the image. The background image is displayed correctly in the form editor / designer, but when I run the application, the background image is missing.
Resource file:
<RCC> <qresource prefix="/"> <file>eb_back_small.png</file> <file>favicon.ico</file> <file>background.jpg</file> </qresource> </RCC>
Here's what it looks like in the editor: 
The style sheet for centralWidget (background.jpg is a simple red image of 500x350):
#centralWidget { background-image: url(:/background.jpg); }
The stylesheet for the widget (just to see if the background color works, because I assume that something is wrong with my resources):
#widget { background-color: rgb(0, 170, 0); }
And this is the end result when the application starts: 
I assume that the assembly cannot access the background image resource, but I have no idea why. I also tried to apply the general background-image property in the Window0 stylesheet, but it doesnβt change anything (for example, if the main window was rewriting the background, but it looks like it is not).
source share