PDA

View Full Version : How can Stylesheet reference non resource image file



dpatel
23rd April 2010, 08:46
I want to set a background image for pushbutton,I can do it by using image file from the resource but I want to be able to reference an image file which is not part of resource (.qrc) file. How can I do it? I have tried specifying following code in .ui file directly but it doesn't work.


<property name="styleSheet">
<string notr="true">border-image: url(grey_button.JPG);</string>
</property>

Lykurg
23rd April 2010, 09:41
You have to use an absolute path or the right relative path. First check with an absolute that your syntax is right, then figure the relative one out and use it.