PDA

View Full Version : style sheet issue.



kaushal_gaurav
5th August 2008, 09:05
Hi,

Is there a way to apply style sheet only to parent widget and not to the child widget.
Actually, i need to draw a frame for the parent widget and not for the chile widget.
i am using setStyleSheet() function to apply style sheet.

Regards.
GK

aamer4yu
5th August 2008, 09:33
You may use the class name in style sheet.
In that way you can specify the frame for your parent widget. :)
Like -
MyClass { border:2px }

kaushal_gaurav
7th August 2008, 07:18
.....But the problem persists...http://www.qtcentre.org/forum/images/smilies/confused.png
:confused:

I have a stacked widget and i want the border on this widget but i do not want the style to apply to child widgets.

i am using the statement myDialog->setStyleSheet("QStackedWidget { border:2px}")

but all the widgets inside the stacked widget are getting the style.

help.