summaryrefslogtreecommitdiffstats
path: root/tests/manual/qscreen/propertyfield.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2015-01-21 11:14:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-01-21 11:14:34 +0100
commit112342b32650f56e289c7dcd181d5897b0b77a78 (patch)
tree76e9a37bcaa70097d009628bb2b116ea782c72cb /tests/manual/qscreen/propertyfield.cpp
parent3bbc1bf53bac7648637d92abecadc568acfffb2d (diff)
parentb6191b16d41459ed73cea738dfaf8e25e81ae22b (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'tests/manual/qscreen/propertyfield.cpp')
-rw-r--r--tests/manual/qscreen/propertyfield.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/manual/qscreen/propertyfield.cpp b/tests/manual/qscreen/propertyfield.cpp
index e6392465f2..f1e5e22ec9 100644
--- a/tests/manual/qscreen/propertyfield.cpp
+++ b/tests/manual/qscreen/propertyfield.cpp
@@ -34,8 +34,9 @@
#include "propertyfield.h"
#include <QDebug>
-PropertyField::PropertyField(QObject* subject, const QMetaProperty& prop, QWidget *parent) :
- QLineEdit(parent), m_subject(subject), m_lastChangeTime(QTime::currentTime()), m_prop(prop)
+PropertyField::PropertyField(QObject* subject, const QMetaProperty& prop, QWidget *parent)
+ : QLineEdit(parent), m_subject(subject), m_lastChangeTime(QTime::currentTime()), m_prop(prop)
+ , m_defaultBrush(palette().brush(QPalette::Active, QPalette::Text))
{
setReadOnly(true);
if (prop.hasNotifySignal()) {
@@ -99,7 +100,7 @@ void PropertyField::propertyChanged()
setText(text);
m_lastText = text;
m_lastTextShowing = text;
- modPalette.setBrush(QPalette::Text, Qt::black);
+ modPalette.setBrush(QPalette::Text, m_defaultBrush);
}
setPalette(modPalette);
}