QCommonStyle 类封装 GUI 的公共外观和感觉。 更多...
头: | #include <QCommonStyle> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
继承: | QStyle |
继承者: | QProxyStyle |
QCommonStyle () | |
virtual | ~QCommonStyle () |
virtual void | drawComplexControl (QStyle::ComplexControl cc , const QStyleOptionComplex * opt , QPainter * p , const QWidget * widget = nullptr) const override |
virtual void | drawControl (QStyle::ControlElement element , const QStyleOption * opt , QPainter * p , const QWidget * widget = nullptr) const override |
virtual void | drawPrimitive (QStyle::PrimitiveElement pe , const QStyleOption * opt , QPainter * p , const QWidget * widget = nullptr) const override |
virtual QPixmap | generatedIconPixmap (QIcon::Mode iconMode , const QPixmap & pixmap , const QStyleOption * opt ) const override |
virtual QStyle::SubControl | hitTestComplexControl (QStyle::ComplexControl cc , const QStyleOptionComplex * opt , const QPoint & pt , const QWidget * widget = nullptr) const override |
virtual int | layoutSpacing (QSizePolicy::ControlType control1 , QSizePolicy::ControlType control2 , Qt::Orientation orientation , const QStyleOption * option = nullptr, const QWidget * widget = nullptr) const override |
virtual int | pixelMetric (QStyle::PixelMetric m , const QStyleOption * opt = nullptr, const QWidget * widget = nullptr) const override |
virtual void | polish (QPalette & pal ) override |
virtual void | polish (QApplication * app ) override |
virtual void | polish (QWidget * widget ) override |
virtual QSize | sizeFromContents (QStyle::ContentsType contentsType , const QStyleOption * opt , const QSize & contentsSize , const QWidget * widget = nullptr) const override |
virtual QPixmap | standardPixmap (QStyle::StandardPixmap sp , const QStyleOption * option = nullptr, const QWidget * widget = nullptr) const override |
virtual int | styleHint (QStyle::StyleHint sh , const QStyleOption * opt = nullptr, const QWidget * widget = nullptr, QStyleHintReturn * hret = nullptr) const override |
virtual QRect | subControlRect (QStyle::ComplexControl cc , const QStyleOptionComplex * opt , QStyle::SubControl sc , const QWidget * widget = nullptr) const override |
virtual QRect | subElementRect (QStyle::SubElement sr , const QStyleOption * opt , const QWidget * widget = nullptr) const override |
virtual void | unpolish (QWidget * widget ) override |
virtual void | unpolish (QApplication * application ) override |
此抽象类实现作为 Qt 的一部分提供并随附了所有 GUI 样式所公共的一些 Widget 外观和感觉。
由于 QCommonStyle 继承 QStyle ,它的所有函数的完整文档是在 QStyle 文档编制。
另请参阅 QStyle and QProxyStyle .
构造 QCommonStyle。
[虚拟]
QCommonStyle::
~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
[override virtual]
int
QCommonStyle::
layoutSpacing
(
QSizePolicy::ControlType
control1
,
QSizePolicy::ControlType
control2
,
Qt::Orientation
orientation
, const
QStyleOption
*
option
= nullptr, const
QWidget
*
widget
= nullptr) const
[override virtual]
int
QCommonStyle::
pixelMetric
(
QStyle::PixelMetric
m
, const
QStyleOption
*
opt
= nullptr, const
QWidget
*
widget
= nullptr) const
[override virtual]
void
QCommonStyle::
polish
(
QPalette
&
pal
)
重实现: QStyle::polish (QPalette &palette).
[override virtual]
void
QCommonStyle::
polish
(
QApplication
*
app
)
重实现: QStyle::polish (QApplication *application).
[override virtual]
void
QCommonStyle::
polish
(
QWidget
*
widget
)
重实现: QStyle::polish (QWidget *widget).
[override virtual]
QSize
QCommonStyle::
sizeFromContents
(
QStyle::ContentsType
contentsType
, const
QStyleOption
*
opt
, const
QSize
&
contentsSize
, const
QWidget
*
widget
= nullptr) const
[override virtual]
QPixmap
QCommonStyle::
standardPixmap
(
QStyle::StandardPixmap
sp
, const
QStyleOption
*
option
= nullptr, const
QWidget
*
widget
= nullptr) const
[override virtual]
int
QCommonStyle::
styleHint
(
QStyle::StyleHint
sh
, const
QStyleOption
*
opt
= nullptr, const
QWidget
*
widget
= nullptr,
QStyleHintReturn
*
hret
= nullptr) const
[override virtual]
QRect
QCommonStyle::
subControlRect
(
QStyle::ComplexControl
cc
, const
QStyleOptionComplex
*
opt
,
QStyle::SubControl
sc
, const
QWidget
*
widget
= nullptr) const
[override virtual]
QRect
QCommonStyle::
subElementRect
(
QStyle::SubElement
sr
, const
QStyleOption
*
opt
, const
QWidget
*
widget
= nullptr) const
[override virtual]
void
QCommonStyle::
unpolish
(
QWidget
*
widget
)
重实现: QStyle::unpolish (QWidget *widget).
[override virtual]
void
QCommonStyle::
unpolish
(
QApplication
*
application
)
重实现: QStyle::unpolish (QApplication *application).