[Qt-interest] Issue with style sheets ?

Surya Kiran Gullapalli suryakiran.gullapalli at gmail.com
Mon Mar 2 13:52:45 CET 2009


Hello,
I've this Qt-Application, where in I provide user an option to change the
font of the application at run time.

I've a Preferences Dialog, with a push button, which when clicked opens up a
QFontDialog. After the font is selected, and user clicked an Apply button on
the Dialog,
the selected font is set using qApp->setFont(QFont) function.

This was working fine, till the other day when I introduced Stylesheets in
my application.

Just when the application starts, I set a style sheet using
qApp->setStyleSheet () function.

Now the problem is when user selects new font from Preferences Dialog, and
clicks apply button (qApp->setFont()) the font is not set.
The User has to click apply button twice to set the new font.

I can confirm that this is happening due to style sheets. The moment i
comment out the setStyleSheet call, qApp->setFont is working fine.

Did anybody face this issue ?
How can i rectify this ?

Thanks in advance,
Surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090302/b09b18d3/attachment.html 


More information about the Qt-interest-old mailing list