Skip to content

PythonQt.QtGui.QGuiApplication · declarations 001

Back to PythonQt.QtGui.QGuiApplication

aboutToQuit

aboutToQuit(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.aboutToQuit; argument details are not documented.

allWindows

allWindows() -> tuple

X.allWindows() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QWindowList QGuiApplication::allWindows()

Returns a list of all the windows in the application.

The list is empty if there are no windows.

See also topLevelWindows().

Upstream PySide2 reference signatures (binding differences may apply):

allWindows() -> typing.List[PySide2.QtGui.QWindow]

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#allWindows

applicationDisplayName instance-attribute

applicationDisplayName: str

Qt 5 reference:

applicationDisplayName : QString

This property holds the user-visible name of this application

This name is shown to the user, for instance in window titles. It can be translated, if necessary.

If not set, the application display name defaults to the application name.

This property was introduced in Qt 5.0.

Access functions:

QString applicationDisplayName()
void setApplicationDisplayName(const QString \&name)

Notifier signal:

void applicationDisplayNameChanged()

See also applicationName.

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#applicationDisplayName

applicationDisplayNameChanged

applicationDisplayNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.applicationDisplayNameChanged; argument details are not documented.

applicationNameChanged

applicationNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.applicationNameChanged; argument details are not documented.

applicationState

applicationState() -> Any

X.applicationState()

Supplemental documentation: Qt 5 reference:

[static] Qt::ApplicationState QGuiApplication::applicationState()

Returns the current state of the application.

You can react to application state changes to perform actions such as stopping/resuming CPU-intensive tasks, freeing/loading resources or saving/restoring application data.

This function was introduced in Qt 5.2.

Upstream PySide2 reference signatures (binding differences may apply):

applicationState() -> PySide2.QtCore.Qt.ApplicationState

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#applicationState

applicationStateChanged

applicationStateChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.applicationStateChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::applicationStateChanged(Qt::ApplicationState state)

This signal is emitted when the state of the application changes.

This function was introduced in Qt 5.2.

See also applicationState().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#applicationStateChanged

applicationVersionChanged

applicationVersionChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.applicationVersionChanged; argument details are not documented.

changeOverrideCursor

changeOverrideCursor(arg__1: Any) -> None

X.changeOverrideCursor(arg__1)

Supplemental documentation: Qt 5 reference:

[static] void QGuiApplication::changeOverrideCursor(const QCursor \&cursor)

Changes the currently active application override cursor to cursor.

This function has no effect if setOverrideCursor() was not called.

See also setOverrideCursor(), overrideCursor(), restoreOverrideCursor(), and QWidget::setCursor().

Upstream PySide2 reference signatures (binding differences may apply):

changeOverrideCursor(arg__1: PySide2.QtGui.QCursor) -> None

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#changeOverrideCursor

clipboard

clipboard() -> Any

X.clipboard() -> PythonQt.QtGui.QClipboard

Supplemental documentation: Qt 5 reference:

[static] QClipboard *QGuiApplication::clipboard()

Returns the object for interacting with the clipboard.

Upstream PySide2 reference signatures (binding differences may apply):

clipboard() -> PySide2.QtGui.QClipboard

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#clipboard

commitDataRequest

commitDataRequest(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.commitDataRequest; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::commitDataRequest(QSessionManager \&manager)

This signal deals with session management. It is emitted when the QSessionManager wants the application to commit all its data.

Usually this means saving all open files, after getting permission from the user. Furthermore you may want to provide a means by which the user can cancel the shutdown.

You should not exit the application within this signal. Instead, the session manager may or may not do this afterwards, depending on the context.

Warning: Within this signal, no user interaction is possible, unless you ask the manager for explicit permission. See QSessionManager::allowsInteraction() and QSessionManager::allowsErrorInteraction() for details and example usage.

Note: You should use Qt::DirectConnection when connecting to this signal.

This function was introduced in Qt 4.2.

See also setFallbackSessionManagementEnabled(), isSessionRestored(), sessionId(), saveStateRequest(), and Session Management.

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#commitDataRequest

desktopFileName instance-attribute

desktopFileName: str

Qt 5 reference:

desktopFileName : QString

This property holds the base name of the desktop entry for this application

This is the file name, without the full path, of the desktop entry that represents this application according to the freedesktop desktop entry specification.

This property gives a precise indication of what desktop entry represents the application and it is needed by the windowing system to retrieve such information without resorting to imprecise heuristics.

The latest version of the freedesktop desktop entry specification can be obtained here.

This property was introduced in Qt 5.7.

Access functions:

QString desktopFileName()
void setDesktopFileName(const QString \&name)

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#desktopFileName

desktopSettingsAware

desktopSettingsAware() -> bool

X.desktopSettingsAware() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGuiApplication::desktopSettingsAware()

Returns true if Qt is set to use the system's standard colors, fonts, etc.; otherwise returns false. The default is true.

See also setDesktopSettingsAware().

Upstream PySide2 reference signatures (binding differences may apply):

desktopSettingsAware() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#desktopSettingsAware

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.destroyed; argument details are not documented.

devicePixelRatio

devicePixelRatio() -> float

X.devicePixelRatio() -> float

Supplemental documentation: Qt 5 reference:

qreal QGuiApplication::devicePixelRatio() const

Returns the highest screen device pixel ratio found on the system. This is the ratio between physical pixels and device-independent pixels.

Use this function only when you don't know which window you are targeting. If you do know the target window, use QWindow::devicePixelRatio() instead.

See also QWindow::devicePixelRatio().

Upstream PySide2 reference signatures (binding differences may apply):

devicePixelRatio(self) -> float

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#devicePixelRatio

event

event(arg__1: Any) -> bool

X.event(arg__1) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QGuiApplication::event(QEvent *e)

Reimplements: QCoreApplication::event(QEvent *e).

Upstream PySide2 reference signatures (binding differences may apply):

event(self, arg__1: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#event

exec

exec() -> int

X.exec() -> int

Supplemental documentation: Qt 5 reference:

[static] int QGuiApplication::exec()

Enters the main event loop and waits until exit() is called, and then returns the value that was set to exit() (which is 0 if exit() is called via quit()).

It is necessary to call this function to start event handling. The main event loop receives events from the window system and dispatches these to the application widgets.

Generally, no user interaction can take place before calling exec().

To make your application perform idle processing, e.g., 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().

We recommend that you connect clean-up code to the aboutToQuit() signal, instead of putting it in your application's main() function. This is because, on some platforms, the QApplication::exec() call may not return.

See also quitOnLastWindowClosed, quit(), exit(), processEvents(), and QCoreApplication::exec().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#exec

focusObject

focusObject() -> Any

X.focusObject() -> PythonQt.private.QObject

Supplemental documentation: Qt 5 reference:

[static] QObject *QGuiApplication::focusObject()

Returns the QObject in currently active window that will be final receiver of events tied to focus, such as key events.

Upstream PySide2 reference signatures (binding differences may apply):

focusObject() -> PySide2.QtCore.QObject

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#focusObject

focusObjectChanged

focusObjectChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.focusObjectChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::focusObjectChanged(QObject *focusObject)

This signal is emitted when final receiver of events tied to focus is changed. focusObject is the new receiver.

See also focusObject().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#focusObjectChanged

focusWindow

focusWindow() -> Any

X.focusWindow() -> PythonQt.QtGui.QWindow

Supplemental documentation: Qt 5 reference:

[static] QWindow *QGuiApplication::focusWindow()

Returns the QWindow that receives events tied to focus, such as key events.

Upstream PySide2 reference signatures (binding differences may apply):

focusWindow() -> PySide2.QtGui.QWindow

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#focusWindow

focusWindowChanged

focusWindowChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.focusWindowChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::focusWindowChanged(QWindow *focusWindow)

This signal is emitted when the focused window changes. focusWindow is the new focused window.

See also focusWindow().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#focusWindowChanged

font

font() -> Any

X.font() -> PythonQt.QtGui.QFont

Supplemental documentation: Qt 5 reference:

[static] QFont QGuiApplication::font()

Returns the default application font.

See also setFont().

Upstream PySide2 reference signatures (binding differences may apply):

font() -> PySide2.QtGui.QFont

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#font

fontChanged

fontChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.fontChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::fontChanged(const QFont \&font)

This signal is emitted when the font of the application changes.

This function was introduced in Qt 5.11.

See also font().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#fontChanged

fontDatabaseChanged

fontDatabaseChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.fontDatabaseChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::fontDatabaseChanged()

This signal is emitted when application fonts are loaded or removed.

See also QFontDatabase::addApplicationFont(), QFontDatabase::addApplicationFontFromData(), QFontDatabase::removeAllApplicationFonts(), and QFontDatabase::removeApplicationFont().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#fontDatabaseChanged

inputMethod

inputMethod() -> Any

X.inputMethod() -> PythonQt.QtGui.QInputMethod

Supplemental documentation: Qt 5 reference:

[static] QInputMethod *QGuiApplication::inputMethod()

returns the input method.

The input method returns properties about the state and position of the virtual keyboard. It also provides information about the position of the current focused input element.

See also QInputMethod.

Upstream PySide2 reference signatures (binding differences may apply):

inputMethod() -> PySide2.QtGui.QInputMethod

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#inputMethod

isFallbackSessionManagementEnabled

isFallbackSessionManagementEnabled() -> bool

X.isFallbackSessionManagementEnabled() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGuiApplication::isFallbackSessionManagementEnabled()

Returns whether QGuiApplication will use fallback session management.

The default is true.

If this is true and the session manager allows user interaction, QGuiApplication will try to close toplevel windows after commitDataRequest() has been emitted. If a window cannot be closed, session shutdown will be canceled and the application will keep running.

Fallback session management only benefits applications that have an "are you sure you want to close this window?" feature or other logic that prevents closing a toplevel window depending on certain conditions, and that do nothing to explicitly implement session management. In applications that do implement session management using the proper session management API, fallback session management interferes and may break session management logic.

Warning: If all windows are closed due to fallback session management and quitOnLastWindowClosed() is true, the application will quit before it is explicitly instructed to quit through the platform's session management protocol. That violation of protocol may prevent the platform session manager from saving application state.

This function was introduced in Qt 5.6.

See also setFallbackSessionManagementEnabled(), QSessionManager::allowsInteraction(), saveStateRequest(), commitDataRequest(), and Session Management.

Upstream PySide2 reference signatures (binding differences may apply):

isFallbackSessionManagementEnabled() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#isFallbackSessionManagementEnabled

isLeftToRight

isLeftToRight() -> bool

X.isLeftToRight() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGuiApplication::isLeftToRight()

Returns true if the application's layout direction is Qt::LeftToRight; otherwise returns false.

See also layoutDirection() and isRightToLeft().

Upstream PySide2 reference signatures (binding differences may apply):

isLeftToRight() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#isLeftToRight

isRightToLeft

isRightToLeft() -> bool

X.isRightToLeft() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QGuiApplication::isRightToLeft()

Returns true if the application's layout direction is Qt::RightToLeft; otherwise returns false.

See also layoutDirection() and isLeftToRight().

Upstream PySide2 reference signatures (binding differences may apply):

isRightToLeft() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#isRightToLeft

isSavingSession

isSavingSession() -> bool

X.isSavingSession() -> bool

Supplemental documentation: Qt 5 reference:

bool QGuiApplication::isSavingSession() const

Returns true if the application is currently saving the session; otherwise returns false.

This is true when commitDataRequest() and saveStateRequest() are emitted, but also when the windows are closed afterwards by session management.

This function was introduced in Qt 5.0.

See also sessionId(), commitDataRequest(), and saveStateRequest().

Upstream PySide2 reference signatures (binding differences may apply):

isSavingSession(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#isSavingSession

isSessionRestored

isSessionRestored() -> bool

X.isSessionRestored() -> bool

Supplemental documentation: Qt 5 reference:

bool QGuiApplication::isSessionRestored() const

Returns true if the application has been restored from an earlier session; otherwise returns false.

See also sessionId(), commitDataRequest(), and saveStateRequest().

Upstream PySide2 reference signatures (binding differences may apply):

isSessionRestored(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#isSessionRestored

keyboardModifiers

keyboardModifiers() -> Any

X.keyboardModifiers()

Supplemental documentation: Qt 5 reference:

[static] Qt::KeyboardModifiers QGuiApplication::keyboardModifiers()

Returns the current state of the modifier keys on the keyboard. The current state is updated sychronously as the event queue is emptied of events that will spontaneously change the keyboard state (QEvent::KeyPress and QEvent::KeyRelease events).

It should be noted this may not reflect the actual keys held on the input device at the time of calling but rather the modifiers as last reported in one of the above events. If no keys are being held Qt::NoModifier is returned.

See also mouseButtons() and queryKeyboardModifiers().

Upstream PySide2 reference signatures (binding differences may apply):

keyboardModifiers() -> PySide2.QtCore.Qt.KeyboardModifiers

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#keyboardModifiers

lastWindowClosed

lastWindowClosed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.lastWindowClosed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QGuiApplication::lastWindowClosed()

This signal is emitted from exec() when the last visible primary window (i.e. window with no parent) is closed.

By default, QGuiApplication quits after this signal is emitted. This feature can be turned off by setting quitOnLastWindowClosed to false.

See also QWindow::close() and QWindow::isTopLevel().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#lastWindowClosed

layoutDirection instance-attribute

layoutDirection: Any

Qt 5 reference:

layoutDirection : Qt::LayoutDirection

This property holds the default layout direction for this application

On system start-up, the default layout direction depends on the application's language.

The notifier signal was introduced in Qt 5.4.

Access functions:

Qt::LayoutDirection layoutDirection()
void setLayoutDirection(Qt::LayoutDirection direction)

Notifier signal:

void layoutDirectionChanged(Qt::LayoutDirection direction)

See also QWidget::layoutDirection, isLeftToRight(), and isRightToLeft().

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#layoutDirection

layoutDirectionChanged

layoutDirectionChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.layoutDirectionChanged; argument details are not documented.

modalWindow

modalWindow() -> Any

X.modalWindow() -> PythonQt.QtGui.QWindow

Supplemental documentation: Qt 5 reference:

[static] QWindow *QGuiApplication::modalWindow()

Returns the most recently shown modal window. If no modal windows are visible, this function returns zero.

A modal window is a window which has its modality property set to Qt::WindowModal or Qt::ApplicationModal. A modal window must be closed before the user can continue with other parts of the program.

Modal window are organized in a stack. This function returns the modal window at the top of the stack.

See also Qt::WindowModality and QWindow::setModality().

Upstream PySide2 reference signatures (binding differences may apply):

modalWindow() -> PySide2.QtGui.QWindow

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#modalWindow

mouseButtons

mouseButtons() -> Any

X.mouseButtons()

Supplemental documentation: Qt 5 reference:

[static] Qt::MouseButtons QGuiApplication::mouseButtons()

Returns the current state of the buttons on the mouse. The current state is updated synchronously as the event queue is emptied of events that will spontaneously change the mouse state (QEvent::MouseButtonPress and QEvent::MouseButtonRelease events).

It should be noted this may not reflect the actual buttons held on the input device at the time of calling but rather the mouse buttons as last reported in one of the above events. If no mouse buttons are being held Qt::NoButton is returned.

See also keyboardModifiers().

Upstream PySide2 reference signatures (binding differences may apply):

mouseButtons() -> PySide2.QtCore.Qt.MouseButtons

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#mouseButtons

notify

notify(arg__1: Any, arg__2: Any) -> bool

X.notify(arg__1, arg__2) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QGuiApplication::notify(QObject *object, QEvent *event)

Reimplements: QCoreApplication::notify(QObject *receiver, QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

notify(self, arg__1: PySide2.QtCore.QObject, arg__2: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#notify

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.objectNameChanged; argument details are not documented.

organizationDomainChanged

organizationDomainChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.organizationDomainChanged; argument details are not documented.

organizationNameChanged

organizationNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGuiApplication.organizationNameChanged; argument details are not documented.