diff options
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 15 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindow.h | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index e12b879..618023e 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -543,7 +543,7 @@ QSoftKeyStack *QMainWindow::softKeyStack() const } /*! - Sets the softkey stackfor the main window to \a softKeyStack. + Sets the softkey stack for the main window to \a softKeyStack. Note: QMainWindow takes ownership of the \a softKeyStack pointer and deletes it at the appropriate time. @@ -559,6 +559,19 @@ void QMainWindow::setSoftKeyStack(QSoftKeyStack *softKeyStack) } d->softKeyStack = softKeyStack; } + +/*! + Returns true if QMainWindow has a softkeystack and false otherwise + + \sa softKeyStack() +*/ +bool QMainWindow::hasSoftKeyStack() +{ + Q_D(QMainWindow); + if (d->softKeyStack ) + return true; + return false; +} #endif // QT_NO_SOFTKEYSTACK #ifndef QT_NO_STATUSBAR diff --git a/src/gui/widgets/qmainwindow.h b/src/gui/widgets/qmainwindow.h index e2dcd5e..01b275e 100644 --- a/src/gui/widgets/qmainwindow.h +++ b/src/gui/widgets/qmainwindow.h @@ -135,6 +135,7 @@ public: #ifndef QT_NO_SOFTKEYSTACK QSoftKeyStack *softKeyStack() const; void setSoftKeyStack(QSoftKeyStack *softKeyStack); + bool hasSoftKeyStack(); #endif #ifndef QT_NO_STATUSBAR |