why setVisibe not work?
General and Desktop
4
Posts
3
Posters
1.5k
Views
2
Watching
-
QAction * QToolBar::addWidget(QWidget * widget)
Adds the given widget to the toolbar as the toolbar's last item.The toolbar takes ownership of widget.
If you add a QToolButton with this method, the toolbar's Qt::ToolButtonStyle will not be respected.
Note: You should use QAction::setVisible() to change the visibility of the widget. Using QWidget::setVisible(), QWidget::show() and QWidget::hide() does not work.
-
Hi,
Look again at the function signature: you get a QAction as a result of addWidget.