Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QApplication::setPalette ( const QPalette palette,
const char *  className = 0 
) [static]

Changes the default application palette to palette.

If className is passed, the change applies only to widgets that inherit className (as reported by QObject::inherits()). If className is left 0, the change affects all widgets, thus overriding any previously set class specific palettes.

The palette may be changed according to the current GUI style in QStyle::polish().

Warning:
Do not use this function in conjunction with {Qt Style Sheets}. 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".
See also:
QWidget::setPalette(), palette(), QStyle::polish()

Definition at line 1595 of file qapplication.cpp.

Referenced by setStyle(), and style().

{
    QApplicationPrivate::setPalette_helper(palette, className, /*clearWidgetPaletteHash=*/ true);
}


Generated by  Doxygen 1.6.0   Back to index