The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar. 更多...
| 頭: | #include <QStyleOptionProgressBar> |
| qmake: | QT += widgets |
| 繼承: | QStyleOption |
| enum | StyleOptionType { Type } |
| enum | StyleOptionVersion { Version } |
| QStyleOptionProgressBar () | |
| QStyleOptionProgressBar (const QStyleOptionProgressBar & other ) |
| bool | bottomToTop |
| bool | invertedAppearance |
| int | maximum |
| int | minimum |
| int | progress |
| QString | text |
| Qt::Alignment | textAlignment |
| bool | textVisible |
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar and version 2.
類型內部使用通過 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 is used to hold information about the type of the style option, and is defined for each QStyleOption 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionProgressBar::Type
|
SO_ProgressBar
|
提供樣式選項的類型 ( SO_ProgressBar 對於此類)。 |
類型內部使用通過 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 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionProgressBar::Version
|
2
|
2 |
版本的使用通過 QStyleOption 子類以實現擴展在不破壞兼容性的情況下。若使用 qstyleoption_cast (),通常不需要校驗它。
另請參閱 StyleOptionType .
構造 QStyleOptionProgressBar , initializing the members variables to their default values.
構造副本為 other 樣式選項。
This variable holds whether the text reads from bottom to top when the progress bar is vertical
默認值為 false。
另請參閱 QProgressBar::textDirection .
This variable holds whether the progress bar's appearance is inverted
默認值為 false。
另請參閱 QProgressBar::invertedAppearance .
This variable holds the maximum value for the progress bar
This is the maximum value in the progress bar. The default value is 0.
另請參閱 QProgressBar::maximum .
This variable holds the minimum value for the progress bar
This is the minimum value in the progress bar. The default value is 0.
另請參閱 QProgressBar::minimum .
This variable holds the current progress for the progress bar
The current progress. A value of QStyleOptionProgressBar::minimum - 1 indicates that the progress hasn't started yet. The default value is 0.
另請參閱 QProgressBar::value .
This variable holds the text for the progress bar
The progress bar text is usually just the progress expressed as a string. An empty string indicates that the progress bar has not started yet. The default value is an empty string.
另請參閱 QProgressBar::text .
This variable holds the text alignment for the text in the QProgressBar
This can be used as a guide on where the text should be in the progress bar. The default value is Qt::AlignLeft .
This variable holds a flag indicating whether or not text is visible
If this flag is true then the text is visible. Otherwise, the text is not visible. The default value is false.
另請參閱 QProgressBar::textVisible .