QCommonStyle Class | Qt Widgets 5.6

Qt 5.6 | Qt Widgets | C++ Classes | QCommonStyle

Qt 5.6.2 Reference Documentation

# QCommonStyle Class

The QCommonStyle class encapsulates the common Look and Feel of a GUI. More...

Header: | #include <QCommonStyle>
qmake: | QT += widgets
Inherits: | QStyle
Inherited By: | QProxyStyle

- List of all members, including inherited members

## Public Functions

| QCommonStyle()
| ~QCommonStyle()

## Reimplemented Public Functions

virtual void | drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const
virtual void | drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const
virtual void | drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const
virtual QPixmap | generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
virtual SubControl | hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget = Q_NULLPTR) const
virtual int | layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const
virtual int | pixelMetric(PixelMetric m, const QStyleOption *opt = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const
virtual void | polish(QPalette &pal)
virtual void | polish(QApplication *app)
virtual void | polish(QWidget *widget)
virtual QSize | sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget = Q_NULLPTR) const
virtual QPixmap | standardPixmap(StandardPixmap sp, const QStyleOption *option = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const
virtual int | styleHint(StyleHint sh, const QStyleOption *opt = Q_NULLPTR, const QWidget *widget = Q_NULLPTR, QStyleHintReturn *hret = Q_NULLPTR) const
virtual QRect | subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget = Q_NULLPTR) const
virtual QRect | subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget = Q_NULLPTR) const
virtual void | unpolish(QWidget *widget)
virtual void | unpolish(QApplication *application)

- 24 public functions inherited from QStyle

### Additional Inherited Members

- 6 static public members inherited from QStyle

## Detailed Description

The QCommonStyle class encapsulates the common Look and Feel of a GUI.

This abstract class implements some of the widget's look and feel that is common to all GUI styles provided and shipped as part of Qt.

Since QCommonStyle inherits QStyle, all of its functions are fully documented in the QStyle documentation.

See also QStyle and QProxyStyle.

## Member Function Documentation

### QCommonStyle::QCommonStyle()

Constructs a QCommonStyle.

### QCommonStyle::~QCommonStyle()

Destroys the style.

### `[virtual]` void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::drawComplexControl().

### `[virtual]` void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::drawControl().

### `[virtual]` void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::drawPrimitive().

### `[virtual]` QPixmap QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const

Reimplemented from QStyle::generatedIconPixmap().

### `[virtual]` SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::hitTestComplexControl().

### `[virtual]` int QCommonStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::layoutSpacing().

### `[virtual]` int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::pixelMetric().

### `[virtual]` void QCommonStyle::polish(QPalette &pal)

Reimplemented from QStyle::polish().

### `[virtual]` void QCommonStyle::polish(QApplication *app)

Reimplemented from QStyle::polish().

### `[virtual]` void QCommonStyle::polish(QWidget *widget)

Reimplemented from QStyle::polish().

### `[virtual]` QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::sizeFromContents().

### `[virtual]` QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::standardPixmap().

### `[virtual]` int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt = Q_NULLPTR, const QWidget *widget = Q_NULLPTR, QStyleHintReturn *hret = Q_NULLPTR) const

Reimplemented from QStyle::styleHint().

### `[virtual]` QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::subControlRect().

### `[virtual]` QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget = Q_NULLPTR) const

Reimplemented from QStyle::subElementRect().

### `[virtual]` void QCommonStyle::unpolish(QWidget *widget)

Reimplemented from QStyle::unpolish().

### `[virtual]` void QCommonStyle::unpolish(QApplication *application)

Reimplemented from QStyle::unpolish().