【发布时间】:2020-03-03 18:11:13
【问题描述】:
我有两个组合框,这是我尝试仅在选择两个框中的选项时启用按钮。
但是,当我只选择一个组合框时,按钮会自动启用。
if self.page2.comboBox2.activated and self.page2.comboBox.activated:
self.page2.viewbutton.setEnabled(True)
else:
self.page2.viewbutton.setEnabled(False)
【问题讨论】:
-
使用
print()查看变量中的内容以及self.page2.comboBox2.activated and self.page2.comboBox.activated获得的内容
标签: python pyqt pyqt5 qcombobox