[Qt-interest] border-image half baked?
KC Jones
kc at asperasoft.com
Tue Feb 23 04:35:27 CET 2010
I really would love it if I could use real, full-featured CSS3 border-image
properties on some of my QFrame widgets.
The docs suggest it is possible. If you look at the docs for border image
at the following link it clearly indicates that not only is it possible to
set a border-image, but you can set the border-image-slice property:
http://doc.trolltech.com/4.5/stylesheet-reference.html#list-of-property-types
But my testing tells me that the most crucial feature, the image slicing,
does not work. At least I have not been able to make it work on my Mac
using Qt 4.5. I have a small test app I can share, either here or in a bug
report, that lets me test easily. It has a background image at
url(:/frame_gb.png). I've tried calling setStyleSheet() with the following:
QFrame { border-image:url(':/frame_bg.png'); }
Which stretches the background image to fit the frame. Close, but I need
slicing. What I try this:
QFrame { border-image:url(':/frame_bg.png') 8 5 8 5 stretch stretch; }
It does something unexpected. It seems to pick up the uniform color of the
interior of the background image and apply that to the full extents of my
QFrame. I've tried using the 'px' suffice on the slice values to make the
units explicit -- no effect. Using percentages gives the same result as no
slice values at all! Replacing 'stretch' with 'repeat' has no effect. But:
QFrame { border-image:url(':/frame_bg.png') repeat; }
Does cause the image to repeat as expected.
So is this a bug? Or have I missed something in the CSS?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100222/3eff9bd8/attachment.html
More information about the Qt-interest-old
mailing list