diff options
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 80912ff409..9d3c5f8616 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -41,7 +41,6 @@ #include "qplatformdefs.h" #include "qabstracteventdispatcher.h" -#include "qaccessible.h" #include "qapplication.h" #include "qclipboard.h" #include "qcursor.h" @@ -190,6 +189,15 @@ QApplicationPrivate::~QApplicationPrivate() any given time. For non-QWidget based Qt applications, use QGuiApplication instead, as it does not depend on the \l QtWidgets library. + Some GUI applications provide a special batch mode ie. provide command line + arguments for executing tasks without manual intervention. In such non-GUI + mode, it is often sufficient to instantiate a plain QCoreApplication to + avoid unnecessarily initializing resources needed for a graphical user + interface. The following example shows how to dynamically create an + appropriate type of application instance: + + \snippet code/src_gui_kernel_qapplication.cpp 0 + The QApplication object is accessible through the instance() function that returns a pointer equivalent to the global qApp pointer. @@ -2653,9 +2661,6 @@ int QApplication::startDragDistance() */ int QApplication::exec() { -#ifndef QT_NO_ACCESSIBILITY - QAccessible::setRootObject(qApp); -#endif return QGuiApplication::exec(); } |