The QStyleOptionFrame class is used to describe the parameters for drawing a frame. 更多...
| 头: | #include <QStyleOptionFrame> |
| 继承: | QStyleOption |
| 继承者: | QStyleOptionFrameV2 |
| enum | StyleOptionType { Type } |
| enum | StyleOptionVersion { Version } |
| QStyleOptionFrame () | |
| QStyleOptionFrame (const QStyleOptionFrame & other ) |
| int | lineWidth |
| int | midLineWidth |
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame , QGroupBox , QLineEdit ,和 QMenu . Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the QStyleOptionFrameV2 子类。
An instance of the QStyleOptionFrame class has type SO_Frame and version 1.
类型内部使用通过 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 (),通常不需要校验它。
If you create your own QStyle subclass, you should handle both QStyleOptionFrame and QStyleOptionFrameV2 .
对于可以如何使用样式选项的演示范例,见 样式 范例。
另请参阅 QStyleOptionFrameV2 and QStyleOption .
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
|
1 |
版本的使用通过 QStyleOption 子类以实现扩展在不破坏兼容性的情况下。若使用 qstyleoption_cast (),通常不需要校验它。
另请参阅 StyleOptionType .
构造 QStyleOptionFrame , initializing the members variables to their default values.
构造副本为 other 样式选项。
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 .