qt5base-lts/examples/widgets/richtext
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
..
calendar Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
orderform Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
syntaxhighlighter Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
textedit Replace QDialog::exec() with open() in text edit example 2023-06-20 07:28:42 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
README Moving .qdoc files under examples/widgets/doc 2012-08-20 12:20:55 +02:00
richtext.pro centralize and fixup example sources install targets 2012-11-29 20:21:11 +01:00

Qt provides powerful document-oriented rich text engine that supports Unicode
and right-to-left scripts. Documents can be manipulated using a cursor-based
API, and their contents can be imported and exported as both HTML and in a
custom XML format.

Text is rendered using anti-aliased outline fonts to provide the best
possible on-screen representation.


Documentation for these examples can be found via the Examples
link in the main Qt documentation.