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>
This commit is contained in:
parent
f7639c0a6d
commit
96ff3fbb66
@ -1224,6 +1224,30 @@ void QMessageBox::setTextFormat(Qt::TextFormat format)
|
||||
d->updateSize();
|
||||
}
|
||||
|
||||
/*!
|
||||
\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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user