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

void QStyle::polish ( QWidget  )  [virtual]

Initializes the appearance of the given widget.

This function is called for every widget at some point after it has been fully created but just before it is shown for the very first time.

Note that the default implementation does nothing. Reasonable actions in this function might be to call the QWidget::setBackgroundMode() function for the widget. Do not use the function to set, for example, the geometry; reimplementing this function do provide a back-door through which the appearance of a widget can be changed, but with Qt 4.0's style engine there is rarely necessary to implement this function; reimplement the drawItemPixmap(), drawItemText(), drawPrimitive(), etc. instead.

The QWidget::inherits() function may provide enough information to allow class-specific customizations. But because new QStyle subclasses are expected to work reasonably with all current and future widgets, limited use of hard-coded customization is recommended.

See also:

Reimplemented in QCleanlooksStyle, QMotifStyle, QPlastiqueStyle, QWindowsStyle, QWindowsVistaStyle, and QWindowsXPStyle.

Definition at line 344 of file qstyle.cpp.

Referenced by QWidget::event(), QMotifStyle::polish(), QWindowsStyle::polish(), QApplication::setStyle(), and QApplication::style().


Generated by  Doxygen 1.6.0   Back to index