summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-10 08:09:56 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-10 11:31:09 +0000
commita83b2c64a9828a1d22347eaf31fd251b2ef647ee (patch)
treeb8d5dae083dddd43c6565514db8e7cee754f91fd /tests/auto/corelib/io
parent9ac5273d03c176156596a23d2a88cf95f0b4d6d6 (diff)
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 'tests/auto/corelib/io')
0 files changed, 0 insertions, 0 deletions