File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 16
16
#include < QLabel>
17
17
#include < QStyleOptionSpinBox>
18
18
#include < QHBoxLayout>
19
+ #include < QEvent>
19
20
20
21
namespace AzQtComponents
21
22
{
@@ -109,6 +110,15 @@ void VectorElement::setCoordinate(VectorElement::Coordinate coordinate)
109
110
setProperty (g_CoordinatePropertyName, QVariant::fromValue (coordinate));
110
111
}
111
112
113
+ void VectorElement::changeEvent (QEvent* event) {
114
+
115
+ if (event->type () == QEvent::EnabledChange) {
116
+ style ()->unpolish (m_label);
117
+ style ()->polish (m_label);
118
+ }
119
+ QWidget::changeEvent (event);
120
+ }
121
+
112
122
QSize VectorElement::sizeHint () const
113
123
{
114
124
QSize size = m_spinBox->sizeHint ();
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ namespace AzQtComponents
106
106
107
107
void onSpinBoxEditingFinished ();
108
108
109
+ virtual void changeEvent (QEvent* event) override ;
109
110
private:
110
111
struct DeferredSetValue
111
112
{
You can’t perform that action at this time.
0 commit comments