diff options
-rw-r--r-- | qt-ui/simplewidgets.cpp | 7 | ||||
-rw-r--r-- | qt-ui/simplewidgets.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 5fb9308fd..89b074ca5 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -326,6 +326,13 @@ QDate DateWidget::date() const return mDate; } +void DateWidget::changeEvent(QEvent *event) +{ + if(event->type() == QEvent::EnabledChange){ + update(); + } +} + void DateWidget::paintEvent(QPaintEvent *event) { static QPixmap pix = QPixmap(":/calendar").scaled(64,64); diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index b8cb8aed4..f57046ea3 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -103,6 +103,7 @@ protected: void focusInEvent(QFocusEvent *); void focusOutEvent(QFocusEvent *); void keyPressEvent(QKeyEvent *); + void changeEvent(QEvent *); signals: void dateChanged(const QDate& date); private: |