diff -r b72c6db6890b -r 5dc02b23752f src/gui/widgets/qtoolbar.cpp --- a/src/gui/widgets/qtoolbar.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/gui/widgets/qtoolbar.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -533,6 +533,14 @@ /*! + \fn void QToolBar::visibilityChanged(bool visible) + \since 4.7 + + This signal is emitted when the toolbar becomes \a visible (or + invisible). This happens when the widget is hidden or shown. +*/ + +/*! Constructs a QToolBar with the given \a parent. */ QToolBar::QToolBar(QWidget *parent) @@ -1122,6 +1130,7 @@ // fallthrough intended case QEvent::Show: d->toggleViewAction->setChecked(event->type() == QEvent::Show); + emit visibilityChanged(event->type() == QEvent::Show); #if defined(Q_WS_MAC) if (toolbarInUnifiedToolBar(this)) { // I can static_cast because I did the qobject_cast in the if above, therefore