Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、Qt を使用して App インターフェイスを構築しています。しかし、1 つの疑問が生じます... QToolbar->addWidget メソッドで QToolButton を追加した QToolbar があります。問題は、後でこのボタンを削除したいということです。
どうすればそれを達成できますか?
addWidget メソッドはありますが、removeWidget 対応のようなものはありません...
何か案が ?
ご協力いただきありがとうございます。
マイキー・マイク
を使用する必要がありますremoveAction。このような:
removeAction
QAction* MyAction = MyToolBar -> addWidget (MyWidget) ; ... MyToolBar -> removeAction (MyAction) ;