path: root/src/corelib
diff options
authorDavid Faure <>2014-03-07 18:33:50 +0100
committerThe Qt Project <>2014-03-13 17:59:44 +0100
commit73d761ffe5ed9364e20e3766afe89213a089ec28 (patch)
tree8056e2b853b2de2443babd2506762fe0068f2fc1 /src/corelib
parent27016b89ae49da091527548af0ca9022ec4d7902 (diff)
Add ReadOnlyChange event to widgets that support setReadOnly(bool).
This is useful for widget styles to react when widgets are set read-only, e.g. to update their palette accordingly. [ChangeLog][QtWidgets] All widgets with a setReadOnly method now send a ReadOnlyChange event (e.g. for app-specific palette changes) Change-Id: I74719a3e1b7d034d9bfc94305f846f42aae935bd Reviewed-by: Friedemann Kleint <> Reviewed-by: Marc Mutz <>
Diffstat (limited to 'src/corelib')
2 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 62c76c1a40..ae2666f19b 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -192,6 +192,7 @@ QT_BEGIN_NAMESPACE
\value Polish The widget is polished.
\value PolishRequest The widget should be polished.
\value QueryWhatsThis The widget should accept the event if it has "What's This?" help.
+ \value ReadOnlyChange Widget's read-only state has changed (since Qt 5.4).
\value RequestSoftwareInputPanel A widget wants to open a software input panel (SIP).
\value Resize Widget's size changed (QResizeEvent).
\value ScrollPrepare The object needs to fill in its geometry information (QScrollPrepareEvent).
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index 3ee0eaaa61..cda0ec1c80 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -150,6 +150,8 @@ public:
WindowUnblocked = 104, // windows modal blocking has ended
WindowStateChange = 105,
+ ReadOnlyChange = 106, // readonly state has changed
ToolTip = 110,
WhatsThis = 111,
StatusTip = 112,