diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-27 15:42:55 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-27 15:45:19 (GMT) |
commit | 576aced5cb8270b1827a505aa0ae815781b1cfa5 (patch) | |
tree | fafaf7513dd8e3919703ee13bb785848f217126c /src/gui/widgets/qtoolbar.cpp | |
parent | df26c6e14287f1a02c636c4624c5085fd8271d11 (diff) | |
download | Qt-576aced5cb8270b1827a505aa0ae815781b1cfa5.zip Qt-576aced5cb8270b1827a505aa0ae815781b1cfa5.tar.gz Qt-576aced5cb8270b1827a505aa0ae815781b1cfa5.tar.bz2 |
QToolBar has now a topLevelChanged signal like in QDockWidget
Task-number: QTBUG-4169
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets/qtoolbar.cpp')
-rw-r--r-- | src/gui/widgets/qtoolbar.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 40c0b02..5596ca4 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -183,6 +183,9 @@ void QToolBarPrivate::setWindowState(bool floating, bool unplug, const QRect &re if (visible) q->show(); + + if (floating != wasFloating) + emit q->topLevelChanged(floating); } void QToolBarPrivate::initDrag(const QPoint &pos) @@ -518,6 +521,19 @@ void QToolBarPrivate::plug(const QRect &r) */ /*! + \since 4.6 + + \fn void QToolBar::topLevelChanged(bool topLevel) + + This signal is emitted when the \l floating property changes. + The \a topLevel parameter is true if the toolbar is now floating; + otherwise it is false. + + \sa isWindow() +*/ + + +/*! Constructs a QToolBar with the given \a parent. */ QToolBar::QToolBar(QWidget *parent) |