def process_started(self):
# Disable everything except for the stop button and the output area
all_children = [obj for obj in self.ui.findChildren(QWidget)
if isinstance(obj, (QCheckBox, QPushButton, QLineEdit))]
self._previous_state = [(obj, obj.isEnabled()) for obj in all_children]
for obj in all_children:
obj.setEnabled(False)
self.ui.btn_stop.setEnabled(True)
# If we let the user interact, this messes with the cursor we use to
# support the progress bar display
self.ui.edit_stdout.setTextInteractionFlags(Qt.NoTextInteraction)
self.app.setOverrideCursor(Qt.WaitCursor)
评论列表
文章目录