PDA

View Full Version : multiple images in style sheet



CopyrightPhilly
2nd October 2007, 17:09
hi,

ok i wasnt sure wether to put this in programming or here but its more design so i put it here as it effects both vs and qt designer.

can anyone tell me how to use multiple images in a style sheet?
i seen in the qt documentation it had this in the image* example:

QTextEdit { image: url(x1.png) url(x2.png) }

basicly, what i want to do is have 3 images in total on the handle element of a scoll bar. (QScrollBar::handle:vertical)

one image at the top left (:/Scroller/Resources/ScrollerBarCap.bmp)
one image at the bottom left (:/Scroller/Resources/ScrollerBarCap.bmp)
one background-image repeated (:/Scroller/Resources/ScrollerBarMid.bmp)

can anyone tell me if this is possable, been searching and trying for a couple of hours and not yet managed to find a way.

[edit] im using QT 4.3

thanks,
Philly

wysota
2nd October 2007, 17:21
I think you should use border-image instead of image. Of course the image will have to be modified.

CopyrightPhilly
2nd October 2007, 17:28
thanks wysota

I never thought of that, worked a treat, basicly i just used
border-top: 5px
border-bottom: 5px;
border-image: url(:/Scroller/Resources/ScrollerBarCap.bmp);

and presto, exaclty what i wanted,

thanks again,
Philly