PDA

View Full Version : I want QLabel which has text boundary(shadow)



xylosper
24th January 2008, 19:49
I want to make letters on label have boundary like drop-shadow for distance 0.

Is there any way to implement this?

Thanks for reading.

wysota
24th January 2008, 21:41
Reimplement paintEvent and draw the shadow using a gray semitransparent pen and then the letters.

seveninches
25th January 2008, 03:18
If the label content is static, it will be easier to create it as a pixmap, and put it there in a designer.

ashukla
25th January 2008, 06:33
Some help can you get using with QPushButton checkable & checked property.

xylosper
26th January 2008, 11:12
I could implement by drawing text with double layer.
Thanks for replying.

anr78
3rd November 2010, 10:09
I see the thread is quite old, but I'm trying to solve this problem as well. Could you explain what you meant by "drawing text with double layer"?

wysota
3rd November 2010, 10:17
It means you first draw the shadow with an offset and then the regular text without the offset. Now you can also use QGraphicsDropShadowEffect effect on the label.