PDA

View Full Version : Ignore stylesheet for one dialog



SeppeVanNolle
11th March 2010, 14:03
Hi,

My application uses a stylesheet which is applied on the QApplication object. However, for the file dialogs (QFileDialog), I would like the default non-stylesheet look. Is there a way to turn off the stylesheet for those dialogs?

Thanks

zgulser
11th March 2010, 14:09
Give your QFileDialogs a default style sheet so that they don't inherit it from QApplication or any other parents. Or give style sheets one by one for every type of your widget like;

QPushButton{....}
QFrame{...}
and so on

SeppeVanNolle
11th March 2010, 14:20
> Give your QFileDialogs a default style sheet so that they don't inherit it from QApplication or any other parents.

How can I give them a 'default' stylesheet? Do you mean creating a new styleheet that looks like the 'default look' or is there an easier way to do this?

Lykurg
11th March 2010, 14:24
Don't give your QFileDialog a parent. Then nothing can be inherited. Or set an empty style sheet.

zgulser
11th March 2010, 14:36
How can I give them a 'default' stylesheet? Do you mean creating a new styleheet that looks like the 'default look' or is there an easier way to do this?

Yes. That's exactly what I said.