diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2012-09-18 06:41:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-11 06:52:56 +0200 |
commit | fff91190285af6520041fba90fe836bdb4870b69 (patch) | |
tree | 67043ecd1a849f49cf93a707ed0a04a33824b34a /src/widgets/widgets | |
parent | 96d00ed19bcdb9224c0fe5bc7bc246fcfece0f0e (diff) |
QSplashScreen - add message function
There is no point in not being able to get the message.
Sometimes it can be the case that we just want to append a dot
(or something else) on the existing message.
Change-Id: I171495f1edc568ae1654f43b3cf734a4eb67d374
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qsplashscreen.cpp | 16 | ||||
-rw-r--r-- | src/widgets/widgets/qsplashscreen.h | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp index 746c02e4e2..b2a0d3f8b8 100644 --- a/src/widgets/widgets/qsplashscreen.cpp +++ b/src/widgets/widgets/qsplashscreen.cpp @@ -200,7 +200,7 @@ void QSplashScreen::repaint() is kept up to date with what your application is doing (e.g., loading files). - \sa Qt::Alignment, clearMessage() + \sa Qt::Alignment, clearMessage(), message() */ void QSplashScreen::showMessage(const QString &message, int alignment, const QColor &color) @@ -214,6 +214,20 @@ void QSplashScreen::showMessage(const QString &message, int alignment, } /*! + \since 5.2 + + Returns the message that is currently displayed on the splash screen. + + \sa showMessage(), clearMessage() +*/ + +QString QSplashScreen::message() const +{ + Q_D(const QSplashScreen); + return d->currStatus; +} + +/*! Removes the message being displayed on the splash screen \sa showMessage() diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h index a1af8e45ef..e675c2e7af 100644 --- a/src/widgets/widgets/qsplashscreen.h +++ b/src/widgets/widgets/qsplashscreen.h @@ -63,6 +63,7 @@ public: const QPixmap pixmap() const; void finish(QWidget *w); void repaint(); + QString message() const; public Q_SLOTS: void showMessage(const QString &message, int alignment = Qt::AlignLeft, |