src/gui/widgets/qtoolbar.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- 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