修改按钮置灰方法

This commit is contained in:
halliday2023 2024-02-13 12:06:59 +08:00
parent 421a530323
commit 1cafd97189
1 changed files with 3 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class Window(formType, baseType):
else:
self.start_run_db()
# 按钮置灰
self.startButton.setEnabled(not self.startButton.isEnabled())
self.startButton.setEnabled(False)
@Slot()
@ -82,7 +82,8 @@ class Window(formType, baseType):
else:
self.stop_run_db()
# 按钮恢复
self.startButton.setEnabled(not self.startButton.isEnabled())
# self.startButton.isEnabled() 获取按钮的状态
self.startButton.setEnabled(True)
@Slot()
def conntest(self):