qt5base-lts/examples
Mikolaj Boc 7022d0e223 Replace QDialog::exec() with open() in text edit example
On WASM, the shortcut triggering the dialog in textedit example
seemingly lets the event invoke the default action. What really happens
is that the dialog's exec() does not return and WASM does not have a
chance to set preventDefault() on the keyboard event it receives. This
masks other problems with keyboards shortcuts.

Uses of exec() on message boxes were replaced, too. Closing operation
is now performed in two steps, first the event is ignored and maybeSave
is called to query for potential changes of the text document.
If there are no changes or the file is discarded, the close continues
with a second event, now accepted.

PrintDialog::exec(), QPrintPreviewDialog::exec(), QFileDialog::exec()
were also eliminated in favor of open().

Finally, indirect calls to exec() via QColorDialog::getColor were
removed.

Task-number: QTBUG-76587
Change-Id: Ia90fad46ec3f94244723512be3ec93b64df9d9ef
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-06-20 07:28:42 +01:00
..
aggregate install a sane top-level examples.pro file 2012-12-11 13:37:57 +01:00
corelib Add missing QApplication include in streambookmarks example 2023-06-17 14:02:04 +02:00
dbus complexpingpong example: Modernize the code 2023-03-28 19:42:01 +02:00
embedded Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
gui Doc: Fix documentation warnings for Qt Gui 2023-05-30 08:29:26 +00:00
network Doc: RSS listing example: Fix file quoting 2023-06-15 11:34:17 +00:00
opengl Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
qmake examples: port qmake examples to new connection style 2022-12-21 22:52:17 +02:00
qpa Examples: Add missing include guards 2023-02-01 18:12:36 +00:00
qtconcurrent Rework imagescaling example to avoid potential crashes 2023-04-26 19:27:30 +02:00
qtestlib Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
sql Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
vulkan Polish forward decl in vulkan and opengl examples 2023-06-01 09:09:49 +02:00
widgets Replace QDialog::exec() with open() in text edit example 2023-06-20 07:28:42 +01:00
xml Examples: "About &Qt" should show info about Qt, not quit 2023-06-16 21:37:11 +02:00
CMakeLists.txt Examples: Use Qt6:: to qualify Qt CMake packages 2022-11-17 19:59:11 +01:00
examples.pro Turn off the dbus examples for qmake-generated VS projects 2021-02-09 15:45:06 +01:00
README Remove more references to demos. 2011-07-08 15:36:26 +02:00

Qt is supplied with a number of example applications that have been
written to provide developers with examples of the Qt API in use,
highlight good programming practice, and showcase features found in each of
Qt's core technologies.


Documentation for examples can be found in the Examples section
of the Qt documentation.