diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-13 03:01:46 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2024-03-03 19:56:55 +0200 |
commit | c610cfe328d911a3cc145f09dade2cd61e5153e2 (patch) | |
tree | ebb733655eb66ccdf26546784642d9485433b815 /src/widgets | |
parent | 4bc0834bc182335984431c6a1525782efc34368c (diff) |
Mention QChronoTimer in API docs
Change-Id: Iaf9fb31994f1580b2051dbd0b1b8eef2a218aa39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qprogressdialog.cpp | 9 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp index d241d50faf..9761bcc828 100644 --- a/src/widgets/dialogs/qprogressdialog.cpp +++ b/src/widgets/dialogs/qprogressdialog.cpp @@ -197,10 +197,11 @@ void QProgressDialogPrivate::_q_disconnectOnClose() A modeless progress dialog is suitable for operations that take place in the background, where the user is able to interact with the - application. Such operations are typically based on QTimer (or - QObject::timerEvent()) or QSocketNotifier; or performed - in a separate thread. A QProgressBar in the status bar of your main window - is often an alternative to a modeless progress dialog. + application. Such operations are typically based on a timer class, + such as QChronoTimer (or the more low-level QObject::timerEvent()) or + QSocketNotifier; or performed in a separate thread. A QProgressBar in + the status bar of your main window is often an alternative to a modeless + progress dialog. You need to have an event loop to be running, connect the canceled() signal to a slot that stops the operation, and call \l diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index f5236d910e..6925ee8909 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2535,8 +2535,9 @@ int QApplication::startDragDistance() exec(), because modal widgets call exec() to start a local event loop. To make your application perform idle processing, i.e., executing a special - function whenever there are no pending events, use a QTimer with 0 timeout. - More advanced idle processing schemes can be achieved using processEvents(). + function whenever there are no pending events, use a QChronoTimer with 0ns + timeout. More advanced idle processing schemes can be achieved using + processEvents(). We recommend that you connect clean-up code to the \l{QCoreApplication::}{aboutToQuit()} signal, instead of putting it in your |