QStyleOptionFrame 類是用於繪製框架的描述參數。 更多...
| 頭: |
#include <QStyleOptionFrame>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
|
| qmake: |
QT += widgets
|
| 繼承: | QStyleOption |
| enum | FrameFeature { None, Flat, Rounded } |
| flags | FrameFeatures |
| enum | StyleOptionType { Type } |
| enum | StyleOptionVersion { Version } |
| QStyleOptionFrame () | |
| QStyleOptionFrame (const QStyleOptionFrame & other ) |
| QStyleOptionFrame::FrameFeatures | features |
| QFrame::Shape | frameShape |
| int | lineWidth |
| int | midLineWidth |
QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame , QGroupBox , QLineEdit ,和 QMenu .
齣於性能原因,有很少成員函數,且對成員變量的訪問是直接的 (即:使用
.
or
->
運算符)。這使結構易於使用並強調這些隻需通過樣式函數使用參數。
An instance of the QStyleOptionFrame class has type SO_Frame and version 3.
類型內部使用通過 QStyleOption ,其子類,和 qstyleoption_cast () to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption 子類以實現擴展在不破壞兼容性的情況下。若使用 qstyleoption_cast (),通常不需要校驗它。
另請參閱 QStyleOption .
This enum describes the different types of features a frame can have.
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionFrame::None
|
0x00
|
Indicates a normal frame. |
QStyleOptionFrame::Flat
|
0x01
|
Indicates a flat frame. |
QStyleOptionFrame::Rounded
|
0x02
|
Indicates a rounded frame. |
The FrameFeatures type is a typedef for QFlags <FrameFeature>. It stores an OR combination of FrameFeature values.
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionFrame::Type
|
SO_Frame
|
提供樣式選項的類型 ( SO_Frame 對於此類)。 |
類型內部使用通過 QStyleOption ,其子類,和 qstyleoption_cast () to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.
另請參閱 StyleOptionVersion .
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionFrame::Version
|
1
|
3 |
版本的使用通過 QStyleOption 子類以實現擴展在不破壞兼容性的情況下。若使用 qstyleoption_cast (),通常不需要校驗它。
另請參閱 StyleOptionType .
Constructs a QStyleOptionFrame, initializing the members variables to their default values.
構造副本為 other 樣式選項。
This variable holds a bitwise OR of the features that describe this frame.
另請參閱 FrameFeature .
This property holds the frame shape value of the frame.
另請參閱 QFrame::frameShape .
This variable holds the line width for drawing the frame
默認值為 0。
另請參閱 QFrame::lineWidth .
This variable holds the mid-line width for drawing the frame
This is usually used in drawing sunken or raised frames.
默認值為 0。
另請參閱 QFrame::midLineWidth .