I'm building my App interface with Qt at the moment. But one question arises... I have a QToolbar to which I added a QToolButton with the QToolbar->addWidget method. The problem is that I want to remove this button later on.
How can I achieve that ?
There is an addWidget method but nothing like a removeWidget correspondence...
Any idea开发者_如何学Python ?
Thanks a lot in advance for your help.
Miky Mike
You have to use removeAction
. Like this:
QAction* MyAction = MyToolBar -> addWidget (MyWidget) ;
...
MyToolBar -> removeAction (MyAction) ;
精彩评论