diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-10 08:09:56 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-10 11:31:09 +0000 |
commit | a83b2c64a9828a1d22347eaf31fd251b2ef647ee (patch) | |
tree | b8d5dae083dddd43c6565514db8e7cee754f91fd /src/gui/kernel/qevent.cpp | |
parent | 9ac5273d03c176156596a23d2a88cf95f0b4d6d6 (diff) | |
download | qtbase-a83b2c64a9828a1d22347eaf31fd251b2ef647ee.tar.gz |
Polish the settingseditor example
The example is meant to show an item delegate with a line edit with
QRegularExpression-based validation depending on type.
Unfortunately, this does not work since QSettings mostly
return QString types.
Fix it to a partially working state by
- Making the expressions match from beginning to end which
was overlooked in the QRegExp->QRegularExpression change.
- Use QCheckBox, QSpinBox for bool/int since it is silly
to have a user edit a bool value by typing 'true'/'false'.
- Move the expressions out to a separate struct to be
able to do some guessing of the type when reading
the QSettings, implement for bool and int.
- Use a fancy Unicode checkmark for displaying bools.
- Fix the garbled display of QByteArray with binary data
by displaying them with hex characters and setting them
read-only.
Change-Id: Iba22dfafc3b813b3fd3d2915ef5210d661049382
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
0 files changed, 0 insertions, 0 deletions