本文整理汇总了Python中PyQt5.QtWidgets.QProgressBar.setDisabled方法的典型用法代码示例。如果您正苦于以下问题:Python QProgressBar.setDisabled方法的具体用法?Python QProgressBar.setDisabled怎么用?Python QProgressBar.setDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QProgressBar
的用法示例。
在下文中一共展示了QProgressBar.setDisabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WindowSR
# 需要导入模块: from PyQt5.QtWidgets import QProgressBar [as 别名]
# 或者: from PyQt5.QtWidgets.QProgressBar import setDisabled [as 别名]
#.........这里部分代码省略.........
row_split.addLayout(column_info)
# Row of separation 2
row_sep2 = QHBoxLayout()
line_sep2 = QFrame()
line_sep2.setFrameShape(QFrame.HLine)
row_sep2.addWidget(line_sep2)
# Add the file location selection row
row_file = QHBoxLayout()
self.but_file = QPushButton("Save location", self)
self.but_file.clicked.connect(self.open_f)
self.text_file = QLineEdit(self.default_path(), self)
row_file.addWidget(self.but_file)
row_file.addWidget(self.text_file)
# Row of separation 3
row_sep3 = QHBoxLayout()
line_sep3 = QFrame()
line_sep3.setFrameShape(QFrame.HLine)
row_sep3.addWidget(line_sep3)
# Download button row
row_dl = QHBoxLayout()
self.bar_dl = QProgressBar(self)
self.bar_dl.setFixedSize(600, 30)
self.bar_dl.setMaximum(100)
self.bar_dl.setMinimum(0)
self.bar_dl.hide()
self.label_dl = QLabel(self)
self.label_dl.hide()
self.but_dl = QPushButton("Download", self)
self.but_dl.clicked.connect(self.manage_download)
self.but_dl.setDisabled(True)
row_dl.addWidget(self.bar_dl)
row_dl.addWidget(self.label_dl)
row_dl.addStretch(1)
row_dl.addWidget(self.but_dl)
# Add every row to the vertical grid
self.vertical_grid.addLayout(row_url)
self.vertical_grid.addLayout(row_sep1)
self.vertical_grid.addLayout(row_split)
self.vertical_grid.addLayout(row_sep2)
self.vertical_grid.addLayout(row_file)
self.vertical_grid.addLayout(row_sep3)
self.vertical_grid.addLayout(row_dl)
# Set layout of the vertical grid to the central widget
self.central_widget.setLayout(self.vertical_grid)
self.show()
def init_client_id(self):
"""Ask for client id if it as never been entered, else load it from
register with QSettings"""
self.client_id = None
self.setting = QSettings(QSettings.UserScope, "BoBibelo",
"SoundRain", self)
if not self.setting.value("SR_bool"): # Setting never set
self.client_id_box()
self.setting.setValue("SR_bool", True)
self.setting.setValue("SR_id", self.client_id)
else:
self.client_id = self.setting.value("SR_id")