diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-20 15:59:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-20 21:38:19 +0100 |
commit | 96ff3fbb66867cb973ea216c7ced1258f6f1fcfa (patch) | |
tree | 73ee3984ddc8e185365e16deeea3289f4d6bdf39 /src/widgets/dialogs | |
parent | f7639c0a6d3ea0aef06594eec0bbbaafb85b0dbb (diff) |
QMessageBox: Add property 'textInteractionFlags'.
Change-Id: Ia7a4801599f18a1202aa89f54e48066e3d271bfb
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 24 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.h | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index e2e15870db..1bab8b7785 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1225,6 +1225,30 @@ void QMessageBox::setTextFormat(Qt::TextFormat format) } /*! + \property QMessageBox::textInteractionFlags + \since 5.1 + + Specifies how the label of the message box should interact with user + input. + + The default value depends on the style. + + \sa QStyle::SH_MessageBox_TextInteractionFlags +*/ + +Qt::TextInteractionFlags QMessageBox::textInteractionFlags() const +{ + Q_D(const QMessageBox); + return d->label->textInteractionFlags(); +} + +void QMessageBox::setTextInteractionFlags(Qt::TextInteractionFlags flags) +{ + Q_D(QMessageBox); + d->label->setTextInteractionFlags(flags); +} + +/*! \reimp */ bool QMessageBox::event(QEvent *e) diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index 927da83741..fdcfdc8779 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -69,6 +69,7 @@ class Q_WIDGETS_EXPORT QMessageBox : public QDialog Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText) #endif Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText) + Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags) public: enum Icon { @@ -186,6 +187,9 @@ public: Qt::TextFormat textFormat() const; void setTextFormat(Qt::TextFormat format); + void setTextInteractionFlags(Qt::TextInteractionFlags flags); + Qt::TextInteractionFlags textInteractionFlags() const; + static StandardButton information(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton); |