So I created this nice PushButton that has a popmenu. Unlike QToolButton, it does not allow me to hide()/show() the button which I find frustrating. I want to be able to hide/destroy this button while the application is in a certain mode and then show/create it in another. How do I do this? (are there no destructor calls in Python?) Or are there an alternative?

Thanks,
Jo

So I created this nice PushButton that has a popmenu. Unlike QToolButton, it does not allow me to hide()/show() the button which I find frustrating. I want to be able to hide/destroy this button while the application is in a certain mode and then show/create it in another. How do I do this? (are there no destructor calls in Python?) Or are there an alternative?

Thanks,
Jo

So I figured out why the PushButton wasn't hiding. Apparently if I comment out my setMenu functionality to it, it works as expected. How do get rid of the setMenu when I'm in a the other mode?

This question has already been answered. Start a new discussion instead.