PDA

View Full Version : Problem using style sheet in hierarchy



narendra
25th February 2010, 08:27
Hi,

I have a problem using style sheet can any one help me please.


If we have widget which is child of some other widget then style properties of the parent is inherited. How can we stop this ?

I want my child widget to take the default style which qt provides.

For ex if i have a widget A with background red .
Widget B is child of A even widget B gets background red but i want B to look like native. What should i do ?
I can set style sheet for B it has to be some default like what we get when widget is created with out setting any style sheet for the first time.

narendra
25th February 2010, 08:29
I think we can't set any style sheet to look native .

zgulser
10th March 2010, 12:34
Regarding this post, any ideas could be very helpfull.

Cruz
10th March 2010, 15:08
How about B.setStyleSheet("") ?

zgulser
10th March 2010, 15:32
I've tried it before but has no effect:(

Cruz
10th March 2010, 15:44
If you are using the ID Selector or the Property Selector (see http://doc.trolltech.com/4.5/stylesheet-syntax.html), is the style still inherited by the children?

zgulser
11th March 2010, 07:49
Hımm..let me try it and make you aware of the result