QCommonStyle类
QCommonStyle类封装了GUI的共同外观和感觉。 更多...
头文件 | #include <QCommonStyle> |
CMake | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake | QT += widgets |
继承 | QStyle |
继承自 |
公共函数
QCommonStyle() | |
虚拟 | ~QCommonStyle() |
重实现公共函数
虚拟void | drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = nullptr) const override |
虚拟void | drawControl(QStyle::ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget = nullptr) const override |
虚拟void | drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget = nullptr) const override |
虚拟QPixmap | generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const override |
虚拟QStyle::SubControl | hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget = nullptr) const override |
虚拟int | layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override |
虚拟int | pixelMetric(QStyle::PixelMetric m, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr) const override |
虚拟void | polish(QPalette &pal) override |
虚拟void | polish(QApplication *app) override |
虚拟void | polish(QWidget *widget) override |
虚拟QSize | sizeFromContents(QStyle::ContentsType contentsType, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget = nullptr) const override |
虚拟QPixmap | standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override |
虚拟int | styleHint(QStyle::StyleHint sh, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr, QStyleHintReturn *hret = nullptr) const override |
虚拟QRect | subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QStyle::SubControl sc, const QWidget *widget = nullptr) const override |
虚拟QRect | subElementRect(QStyle::SubElement sr, const QStyleOption *opt, const QWidget *widget = nullptr) const override |
虚拟void | unpolish(QWidget *widget) override |
虚拟void | unpolish(QApplication *application) override |
另请参阅QStyle 和 QProxyStyle。
成员函数文档
QCommonStyle()
构造一个 QCommonStyle。
[virtual noexcept]
~QCommonStyle()
销毁样式。
[override virtual]
void QCommonStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = nullptr) const
[override virtual]
void QCommonStyle::drawControl(QStyle::ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget = nullptr) const
[override virtual]
void QCommonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget = nullptr) const
[override virtual]
QPixmap QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
[override virtual]
QStyle::SubControl QCommonStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget = nullptr) const
[重写虚函数]
int QCommonStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const
[重写虚函数]
int QCommonStyle::pixelMetric(QStyle::PixelMetric m, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr) const
[重写虚函数]
void QCommonStyle::polish(QPalette &pal)
重实现了: QStyle::polish(QPalette &palette).
[重写虚函数]
void QCommonStyle::polish(QApplication *app)
重实现了: QStyle::polish(QApplication *application).
[重写虚函数]
void QCommonStyle::polish(QWidget *widget)
重实现了: QStyle::polish(QWidget *widget).
[重写虚函数]
QSize QCommonStyle::sizeFromContents(QStyle::ContentsType contentsType, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget = nullptr) const
[重写虚函数]
QPixmap QCommonStyle::standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const
[重写虚拟]
int QCommonStyle::styleHint(QStyle::StyleHint sh, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr, QStyleHintReturn *hret = nullptr) const
[重写虚拟]
QRect QCommonStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QStyle::SubControl sc, const QWidget *widget = nullptr) const
[重写虚拟]
QRect QCommonStyle::subElementRect(QStyle::SubElement sr, const QStyleOption *opt, const QWidget *widget = nullptr) const
[重写虚拟]
void QCommonStyle::unpolish(QWidget *widget)
重写实现: QStyle::unpolish(QWidget *widget).
[重写虚拟]
void QCommonStyle::unpolish(QApplication *application)
重写实现: QStyle::unpolish(QApplication *application).
© 2024 The Qt Company Ltd. 本文件中包含的文档贡献为各自所有者的版权。所提供的文档根据自由软件基金会发布的 GNU 自由文档许可协议版本 1.3 的条款进行许可。Qt 及相关商标为 The Qt Company Ltd. 在芬兰和/或其他国家的商标。所有其他商标均为各自所有者的财产。