[Qt-interest] Restoring default widget brush

Denis Akhmetzyanov dakhmetzyanov at smartlabs.tv
Fri Apr 9 11:13:51 CEST 2010


But the application's palette and the current widget's palette may be
different (or become different in the future). Some other widget could
change application's palette or you could change your widget's palette
during further development. For example the note from
QApplication::setPalette() doc:

*Warning: Do not use this function in conjunction with Qt Style
Sheets<stylesheet.html>.
When using style sheets, the palette of a widget can be customized using the
"color", "background-color", "selection-color", "selection-background-color"
and "alternate-background-color".*
*
*
*So it seems to me a fragile decision which can leads to trouble in the
future.
*

2010/4/8 Nikos Chantziaras <realnc at arcor.de>

> On 04/08/2010 09:15 PM, J-P Nurmi wrote:
> > On Thu, Apr 8, 2010 at 8:54 PM, Nikos Chantziaras<realnc at arcor.de>
>  wrote:
> >> That should work.  But this shouldn't be needed at all.  There has to be
> >> a way to reset the brush to its default without doing backups.
> >>
> >
> > QPalette::QPalette() constructs a palette object that uses the
> > application's default palette.
>
> Thanks!  Somehow I missed that one.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Best regards,
Denis Akhmetzyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100409/9420d322/attachment.html 


More information about the Qt-interest-old mailing list