I want to write a if
with a condition as the state of QPushButton
. I would like to execute if
if the button is enabled. So, how can i check the state of the Button.
Code:
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