Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 字幕进度条_Python_Python 3.x_Pyqt_Pyqt5_Progress Bar - Fatal编程技术网

Python 字幕进度条

Python 字幕进度条,python,python-3.x,pyqt,pyqt5,progress-bar,Python,Python 3.x,Pyqt,Pyqt5,Progress Bar,我想在点击按钮后在pyqt5中显示字幕进度条。 在网上搜索,在pyqt5中找不到有关字幕进度条的主题 < C++语言QT框架> void ComboBoxItemDelegate::paint(qPaint*painter,const QStyleOptionViewItem&option,const qModelLindex&index)const//(qPaint*painter,const QStyleOptionViewItem&option,const qModelLindex&in

我想在点击按钮后在pyqt5中显示字幕进度条。 在网上搜索,在pyqt5中找不到有关字幕进度条的主题

< C++语言QT框架>

void ComboBoxItemDelegate::paint(qPaint*painter,const QStyleOptionViewItem&option,const qModelLindex&index)const//(qPaint*painter,const QStyleOptionViewItem&option,const qModelLindex&index)const
{
QSTYLEOPTIONCOMBOX组合框选项;
comboBoxOption.rect=option.rect;
comboBoxOption.state=option.state;
comboBoxOption.state |=QStyle::state_已启用;
comboBoxOption.state |=QStyle::state_On;
comboBoxOption.Subcrols=QStyle::SC_All;
comboBoxOption.editable=false;
comboBoxOption.currentText=index.model()->数据(index.toString();
QApplication::style()->drawComplexControl(QStyle::CC_组合框和组合框选项,painter);
QApplication::style()->drawControl(QStyle::CE_ComboBoxLabel和comboBoxOption,painter);
}

不确定问题中的代码块与问题本身有什么关系,但对于选框类型的progressbar,您可以使用普通的QProgressBar并将其范围设置为(0,0)。这会将进度条设置为未确定状态。