PDA

View Full Version : QWidget stylesheet problem!



tamnv110
16th August 2011, 10:25
I have a QWidget and i set border image for it. But it don't show image:
css:
QWidget
{
border-image: url(:/anhnen.jpg);
}
i seached in google but i not found. Help me.

Jonny174
16th August 2011, 11:57
Show here: http://doc.crossplatform.ru/qt/4.6.x/stylesheet-examples.html#qpushbutton-and-images

Try load not jpg

tamnv110
17th August 2011, 03:46
hmm! i try load image .png, but it not successfull.

Added after 1 9 minutes:

yeah, i resolved it. Thank you.

superpacko
18th August 2011, 14:29
assuming that you have a resources file, and the file 'anhnen.jpg' has been added to it, did you store the file in the root of the resources or inside a folder?

resources/
anhnen.jpg

or

resources/
something/
anhnen.jpg -->this case would be url(:/something/anhnen.jpg);