Qt Stylesheet: border-image attribute ignored by QPushButton (works with QLineEdit)
The subject pretty much says it all. I'm playing around with the Stylesheet-Example-Project with Qt 4.2 but wasn't able to set a border-image for the Buttons. The strange thing is that the lines
border-image: url(:/images/pushbutton.png) 4;
border-width: 4px;
work perfectly for QLineEdit but don't work for QPushButton at all!
Any help would be greatly appreciated!
I didn't change much in the example - just loaded the Form in Qt Designer, added the new image to the resource and recompiled everything - I'm using the stylesheet editor in the application itself to play around with it...
Thanks in advance!
Re: Qt Stylesheet: border-image attribute ignored by QPushButton (works with QLineEdi
I've seen border-image in action on QPushButtons, so you must have made some mistake. AFAIR the documentation has a working example of using border-images with a push button.
I just checked in Designer and it works fine for me. Check with an image taken from file, not from a resource.
Re: Qt Stylesheet: border-image attribute ignored by QPushButton (works with QLineEdi
Thanks! Taking the image from file works!!
Re: Qt Stylesheet: border-image attribute ignored by QPushButton (works with QLineEdi
Looks like your resource was set up incorrectly and the image didn't exist. Did you link your application with that resource?