0

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

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Beat_Slayer
0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.