QProgressBarwidget provides a horizontal or vertical progress bar. 更多 …
def
alignment
()
def
format
()
def
initStyleOption
(option)
def
invertedAppearance
()
def
isTextVisible
()
def
maximum
()
def
minimum
()
def
orientation
()
def
resetFormat
()
def
setAlignment
(alignment)
def
setFormat
(format)
def
setInvertedAppearance
(invert)
def
setTextDirection
(textDirection)
def
setTextVisible
(visible)
def
textDirection
()
def
value
()
def
reset
()
def
setMaximum
(maximum)
def
setMinimum
(minimum)
def
setOrientation
(arg__1)
def
setRange
(minimum, maximum)
def
setValue
(value)
def
valueChanged
(value)
![]()
进度条被用于向用户给出操作进度指示,并安慰用户应用程序仍在运行。
The progress bar uses the concept of steps . You set it up by specifying the minimum and maximum possible step values, and it will display the percentage of steps that have been completed when you later give it the current step value. The percentage is calculated by dividing the progress (
value()-minimum()) divided bymaximum()-minimum().可以指定最小 最大步进数采用
setMinimum()andsetMaximum。设置当前步进数采用setValue(). The progress bar can be rewound to the beginning withreset().If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using
QNetworkAccessManagerto download items when they are unable to determine the size of the item being downloaded.
QProgressBar
(
[
parent=None
]
)
¶
- param parent
构造进度条采用给定
parent
.
默认情况下,最小步进值被设为 0,最大步进值被设为 100。
另请参阅
PySide2.QtWidgets.QProgressBar.
Direction
¶
指定阅读方向为
text
为垂直进度条。
|
常量 |
描述 |
|---|---|
|
QProgressBar.TopToBottom |
文本被顺时针旋转 90 度。 |
|
QProgressBar.BottomToTop |
文本被逆时针旋转 90 度。 |
注意:是否绘制文本取决于风格。目前 CleanLooks 和 Plastique 风格绘制文本。Mac、Windows 及 WindowsVista 风格不绘制文本。
另请参阅
PySide2.QtWidgets.QProgressBar.
alignment
(
)
¶
Alignment
另请参阅
PySide2.QtWidgets.QProgressBar.
format
(
)
¶
unicode
另请参阅
PySide2.QtWidgets.QProgressBar.
initStyleOption
(
option
)
¶
option
–
QStyleOptionProgressBar
初始化
option
采用值来自此
QProgressBar
。此方法对子类是有用的,当需要
QStyleOptionProgressBar
, but don’t want to fill in all the information themselves.
另请参阅
PySide2.QtWidgets.QProgressBar.
invertedAppearance
(
)
¶
bool
PySide2.QtWidgets.QProgressBar.
isTextVisible
(
)
¶
bool
PySide2.QtWidgets.QProgressBar.
maximum
(
)
¶
int
另请参阅
PySide2.QtWidgets.QProgressBar.
minimum
(
)
¶
int
另请参阅
PySide2.QtWidgets.QProgressBar.
orientation
(
)
¶
取向
另请参阅
PySide2.QtWidgets.QProgressBar.
reset
(
)
¶
Reset the progress bar. The progress bar “rewinds” and shows no progress.
PySide2.QtWidgets.QProgressBar.
resetFormat
(
)
¶
PySide2.QtWidgets.QProgressBar.
setAlignment
(
alignment
)
¶
alignment
–
Alignment
另请参阅
PySide2.QtWidgets.QProgressBar.
setInvertedAppearance
(
invert
)
¶
invert
–
bool
另请参阅
PySide2.QtWidgets.QProgressBar.
setOrientation
(
arg__1
)
¶
arg__1
–
取向
另请参阅
PySide2.QtWidgets.QProgressBar.
setRange
(
minimum
,
maximum
)
¶
minimum
–
int
maximum
–
int
Sets the progress bar’s minimum and maximum values to
minimum
and
maximum
分别。
若
maximum
小于
minimum
,
minimum
变为唯一合法值。
若当前值落在新范围之外,进度条被重置采用
reset()
.
QProgressBar
can be set to undetermined state by using (0, 0).
PySide2.QtWidgets.QProgressBar.
setTextDirection
(
textDirection
)
¶
textDirection
–
Direction
另请参阅
PySide2.QtWidgets.QProgressBar.
setTextVisible
(
visible
)
¶
visible
–
bool
另请参阅
PySide2.QtWidgets.QProgressBar.
text
(
)
¶
unicode
PySide2.QtWidgets.QProgressBar.
textDirection
(
)
¶
另请参阅
PySide2.QtWidgets.QProgressBar.
value
(
)
¶
int
另请参阅
PySide2.QtWidgets.QProgressBar.
valueChanged
(
value
)
¶
value
–
int