我想写一个状态为QPushButton
的if
条件。如果按钮被启用,我想执行if
。所以,我怎样才能检查按钮的状态。
代码:
self.pushButton = QtGui.QPushButton()
self.pushbutton.setEnabled(False)
self.pushbutton.setEnabled(False) ##some where in the another class I have enabled it this line will not be executed all the time,so I want the check state.
if self.pushbutton.checkstate() == Enabled: ##??? How to write this condition?
some code I want to execute
目前没有回答
相关问题 更多 >
编程相关推荐