PDA

View Full Version : Setting QDial background image using stylesheet



dpatel
28th April 2010, 13:13
Hi,

I am using Qt 4.6.2 and trying to set the background image of QDial using stylesheet, but its not setting. I can set the background color but not image. I also tried border image as well, but no luck.



QDial{
color:red; /*this works*/
background-image: url(:/Resources/bckgrnd.png); /*this doesn't */
}

I can set the background image by subclassing QDial as explained in http://www.qtcentre.org/threads/29003-Trying-to-create-custom-QDial?highlight=qdial but I don't want to subclass QDial.

Can anyone tell me why stylesheet is not working to setup the background image and if there is any other way to set the background image of QDial.

Thanks