Issue
I'm trying to disable a pushButton when another one is clicked and running an application but I dont really know how to do that (Im a beginner).
I was trying something like
if self.pushButton_IDBOX.clicked.connect(self.sa_h.idbox_test):
self.pushButton_PTT.setEnabled(False)
Thank you for reading my question and your help!
Solution
Method connect
is not a boolean method. Therefore, your if will not work.
You have to create another method to run test and disable desired button.
def onClickIDBOX(self):
self.sa_h.idbox_test()
self.pushButton_PTT.setEnabled(False)
Then trigger it when pushButton_IDBOX
is clicked.
self.pushButton_IDBOX.clicked.connect(self.onClickIDBOX)
Answered By - Ananta
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.