junvfx Posted July 6, 2018 Share Posted July 6, 2018 hi, everyone。Look at my problem. I use pyside2 create UI in houdini. when I click button B , print info and button B shape have change when I click button A, print info but button A shape not have change please help pyside2_test.py Quote Link to comment Share on other sites More sharing options...
junvfx Posted July 7, 2018 Author Share Posted July 7, 2018 solved it add setDown def mousePressEvent(self, event): self.setDown(True) print "button A" def mouseReleaseEvent(self, event): self.setDown(False) Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted July 9, 2018 Share Posted July 9, 2018 Here's a simpler way: QPushButton.setCheckable(True) QPushButton.isCheked() 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.