QStyleOptionFrame 類

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 .

成員類型文檔編製

enum QStyleOptionFrame:: StyleOptionType

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 .

enum QStyleOptionFrame:: 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:: QStyleOptionFrame ()

構造 QStyleOptionFrame , initializing the members variables to their default values.

QStyleOptionFrame:: QStyleOptionFrame (const QStyleOptionFrame & other )

構造副本為 other 樣式選項。

成員變量文檔編製

int QStyleOptionFrame:: lineWidth

This variable holds the line width for drawing the frame.

默認值為 0。

另請參閱 QFrame::lineWidth .

int QStyleOptionFrame:: midLineWidth

This variable holds the mid-line width for drawing the frame.

This is usually used in drawing sunken or raised frames.

默認值為 0。

另請參閱 QFrame::midLineWidth .