PythonQt.QtGui.QGuiApplication · declarations 002
Back to PythonQt.QtGui.QGuiApplication
overrideCursor
overrideCursor() -> Any
X.overrideCursor() -> PythonQt.QtGui.QCursor
Supplemental documentation: Qt 5 reference:
[static] QCursor *QGuiApplication::overrideCursor()
Returns the active application override cursor.
This function returns nullptr if no application cursor has been defined (i.e. the
internal cursor stack is empty).
See also setOverrideCursor() and restoreOverrideCursor().
Upstream PySide2 reference signatures (binding differences may apply):
overrideCursor() -> PySide2.QtGui.QCursor
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#overrideCursor
palette
palette() -> Any
X.palette() -> PythonQt.QtGui.QPalette
Supplemental documentation: Qt 5 reference:
[static] QPalette QGuiApplication::palette()
Returns the current application palette.
Roles that have not been explicitly set will reflect the system's platform theme.
See also setPalette().
Upstream PySide2 reference signatures (binding differences may apply):
palette() -> PySide2.QtGui.QPalette
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#palette
paletteChanged
paletteChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QGuiApplication.paletteChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QGuiApplication::paletteChanged(const QPalette \&palette)
This signal is emitted when the palette of the application changes.
This function was introduced in Qt 5.4.
See also palette().
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#paletteChanged
platformName
instance-attribute
platformName: str
Qt 5 reference:
platformName : const QString
This property holds the name of the underlying platform plugin.
The QPA platform plugins are located in qtbase\src\plugins\platforms. At the time of
writing, the following platform plugin names are supported:
androidcocoais a platform plugin for macOS.directfbeglfsis a platform plugin for running Qt5 applications on top of EGL and OpenGL ES 2.0 without an actual windowing system (like X11 or Wayland). For more information, see EGLFS.ios(also used for tvOS)kmsis an experimental platform plugin using kernel modesetting and DRM (Direct Rendering Manager).linuxfbwrites directly to the framebuffer. For more information, see LinuxFB.minimalis provided as an examples for developers who want to write their own platform plugins. However, you can use the plugin to run GUI applications in environments without a GUI, such as servers.minimaleglis an example plugin.offscreenopenwfdqnxwindowswaylandis a platform plugin for modern Linux desktops and some embedded systems.xcbis the X11 plugin used on regular desktop Linux platforms.
For more information about the platform plugins for embedded Linux devices, see Qt for Embedded Linux.
Access functions:
| QString | platformName() |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#platformName
primaryScreen
instance-attribute
primaryScreen: QScreen
Qt 5 reference:
primaryScreen : QScreen* const
This property holds the primary (or default) screen of the application.
This will be the screen where QWindows are initially shown, unless otherwise specified.
The primaryScreenChanged signal was introduced in Qt 5.6.
Access functions:
| QScreen * | primaryScreen() |
|---|---|
Notifier signal:
| void | primaryScreenChanged(QScreen *screen) |
|---|---|
See also screens().
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#primaryScreen
primaryScreenChanged
primaryScreenChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QGuiApplication.primaryScreenChanged; argument details are not documented.
queryKeyboardModifiers
queryKeyboardModifiers() -> Any
X.queryKeyboardModifiers()
Supplemental documentation: Qt 5 reference:
[static] Qt::KeyboardModifiers QGuiApplication::queryKeyboardModifiers()
Queries and returns the state of the modifier keys on the keyboard. Unlike keyboardModifiers, this method returns the actual keys held on the input device at the time of calling the method.
It does not rely on the keypress events having been received by this process, which makes it possible to check the modifiers while moving a window, for instance. Note that in most cases, you should use keyboardModifiers(), which is faster and more accurate since it contains the state of the modifiers as they were when the currently processed event was received.
See also keyboardModifiers().
Upstream PySide2 reference signatures (binding differences may apply):
queryKeyboardModifiers() -> PySide2.QtCore.Qt.KeyboardModifiers
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#queryKeyboardModifiers
quitOnLastWindowClosed
instance-attribute
quitOnLastWindowClosed: bool
Qt 5 reference:
quitOnLastWindowClosed : bool
This property holds whether the application implicitly quits when the last window is closed.
The default is true.
If this property is true, the applications quits when the last visible primary window
(i.e. window with no parent) is closed.
Access functions:
| bool | quitOnLastWindowClosed() |
|---|---|
| void | setQuitOnLastWindowClosed(bool quit) |
See also quit() and QWindow::close().
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#quitOnLastWindowClosed
restoreOverrideCursor
restoreOverrideCursor() -> None
X.restoreOverrideCursor()
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::restoreOverrideCursor()
Undoes the last setOverrideCursor().
If setOverrideCursor() has been called twice, calling restoreOverrideCursor() will activate the first cursor set. Calling this function a second time restores the original widgets' cursors.
See also setOverrideCursor() and overrideCursor().
Upstream PySide2 reference signatures (binding differences may apply):
restoreOverrideCursor() -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#restoreOverrideCursor
saveStateRequest
saveStateRequest(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QGuiApplication.saveStateRequest; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QGuiApplication::saveStateRequest(QSessionManager \&manager)
This signal deals with session management. It is invoked when the session manager wants the application to preserve its state for a future session.
For example, a text editor would create a temporary file that includes the current contents of its edit buffers, the location of the cursor and other aspects of the current editing session.
You should never exit the application within this signal. Instead, the session manager may or may not do this afterwards, depending on the context. Furthermore, most session managers will very likely request a saved state immediately after the application has been started. This permits the session manager to learn about the application's restart policy.
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.
Note: You should use Qt::DirectConnection when connecting to this signal.
This function was introduced in Qt 4.2.
See also isSessionRestored(), sessionId(), commitDataRequest(), and Session Management.
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#saveStateRequest
screenAdded
screenAdded(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QGuiApplication.screenAdded; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QGuiApplication::screenAdded(QScreen *screen)
This signal is emitted whenever a new screen screen has been added to the system.
See also screens(), primaryScreen, and screenRemoved().
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#screenAdded
screenRemoved
screenRemoved(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QGuiApplication.screenRemoved; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QGuiApplication::screenRemoved(QScreen *screen)
This signal is emitted whenever a screen is removed from the system. It provides an opportunity to manage the windows on the screen before Qt falls back to moving them to the primary screen.
This function was introduced in Qt 5.4.
See also screens(), screenAdded(), QObject::destroyed(), and QWindow::setScreen().
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#screenRemoved
screens
screens() -> tuple
X.screens() -> tuple
Supplemental documentation: Qt 5 reference:
[static] QList\<QScreen *> QGuiApplication::screens()
Returns a list of all the screens associated with the windowing system the application is connected to.
Upstream PySide2 reference signatures (binding differences may apply):
screens() -> typing.List[PySide2.QtGui.QScreen]
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#screens
sessionId
sessionId() -> str
X.sessionId() -> str
Supplemental documentation: Qt 5 reference:
QString QGuiApplication::sessionId() const
Returns the current session's identifier.
If the application has been restored from an earlier session, this identifier is the same as it was in that previous session. The session identifier is guaranteed to be unique both for different applications and for different instances of the same application.
See also isSessionRestored(), sessionKey(), commitDataRequest(), and saveStateRequest().
Upstream PySide2 reference signatures (binding differences may apply):
sessionId(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#sessionId
sessionKey
sessionKey() -> str
X.sessionKey() -> str
Supplemental documentation: Qt 5 reference:
QString QGuiApplication::sessionKey() const
Returns the session key in the current session.
If the application has been restored from an earlier session, this key is the same as it was when the previous session ended.
The session key changes every time the session is saved. If the shutdown process is cancelled, another session key will be used when shutting down again.
See also isSessionRestored(), sessionId(), commitDataRequest(), and saveStateRequest().
Upstream PySide2 reference signatures (binding differences may apply):
sessionKey(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#sessionKey
setApplicationDisplayName
setApplicationDisplayName(name: str) -> None
X.setApplicationDisplayName(name)
Upstream PySide2 reference signatures (binding differences may apply):
setApplicationDisplayName(name: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setApplicationDisplayName
setDesktopSettingsAware
setDesktopSettingsAware(on: bool) -> None
X.setDesktopSettingsAware(on)
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::setDesktopSettingsAware(bool on)
Sets whether Qt should use the system's standard colors, fonts, etc., to on. By
default, this is true.
This function must be called before creating the QGuiApplication object, like this:
int main(int argc, char *argv[])
{
QApplication::setDesktopSettingsAware(false);
QApplication app(argc, argv);
...
return app.exec();
}
See also desktopSettingsAware().
Upstream PySide2 reference signatures (binding differences may apply):
setDesktopSettingsAware(on: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setDesktopSettingsAware
setFallbackSessionManagementEnabled
setFallbackSessionManagementEnabled(arg__1: bool) -> None
X.setFallbackSessionManagementEnabled(arg__1)
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::setFallbackSessionManagementEnabled(bool enabled)
Sets whether QGuiApplication will use fallback session management to enabled.
This function was introduced in Qt 5.6.
See also isFallbackSessionManagementEnabled().
Upstream PySide2 reference signatures (binding differences may apply):
setFallbackSessionManagementEnabled(arg__1: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setFallbackSessionManagementEnabled
setFont
setFont(arg__1: Any) -> None
X.setFont(arg__1)
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::setFont(const QFont \&font)
Changes the default application font to font.
See also font().
Upstream PySide2 reference signatures (binding differences may apply):
setFont(arg__1: PySide2.QtGui.QFont) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setFont
setLayoutDirection
setLayoutDirection(direction: Any) -> None
X.setLayoutDirection(direction)
Upstream PySide2 reference signatures (binding differences may apply):
setLayoutDirection(direction: PySide2.QtCore.Qt.LayoutDirection) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setLayoutDirection
setOverrideCursor
setOverrideCursor(arg__1: Any) -> None
X.setOverrideCursor(arg__1)
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::setOverrideCursor(const QCursor \&cursor)
Sets the application override cursor to cursor.
Application override cursors are intended for showing the user that the application is in a special state, for example during an operation that might take some time.
This cursor will be displayed in all the application's widgets until restoreOverrideCursor() or another setOverrideCursor() is called.
Application cursors are stored on an internal stack. setOverrideCursor() pushes the cursor onto the stack, and restoreOverrideCursor() pops the active cursor off the stack. changeOverrideCursor() changes the curently active application override cursor.
Every setOverrideCursor() must eventually be followed by a corresponding restoreOverrideCursor(), otherwise the stack will never be emptied.
Example:
QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
calculateHugeMandelbrot(); // lunch time...
QGuiApplication::restoreOverrideCursor();
See also overrideCursor(), restoreOverrideCursor(), changeOverrideCursor(), and QWidget::setCursor().
Upstream PySide2 reference signatures (binding differences may apply):
setOverrideCursor(arg__1: PySide2.QtGui.QCursor) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setOverrideCursor
setPalette
setPalette(pal: Any) -> None
X.setPalette(pal)
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::setPalette(const QPalette \&pal)
Changes the application palette to pal.
The color roles from this palette are combined with the system's platform theme to form the application's final palette.
See also palette().
Upstream PySide2 reference signatures (binding differences may apply):
setPalette(pal: PySide2.QtGui.QPalette) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setPalette
setQuitOnLastWindowClosed
setQuitOnLastWindowClosed(quit: bool) -> None
X.setQuitOnLastWindowClosed(quit)
Upstream PySide2 reference signatures (binding differences may apply):
setQuitOnLastWindowClosed(quit: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setQuitOnLastWindowClosed
setWindowIcon
setWindowIcon(icon: Any) -> None
X.setWindowIcon(icon)
Upstream PySide2 reference signatures (binding differences may apply):
setWindowIcon(icon: PySide2.QtGui.QIcon) -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#setWindowIcon
styleHints
styleHints() -> Any
X.styleHints() -> PythonQt.QtGui.QStyleHints
Supplemental documentation: Qt 5 reference:
[static] QStyleHints *QGuiApplication::styleHints()
Returns the application's style hints.
The style hints encapsulate a set of platform dependent properties such as double click intervals, full width selection and others.
The hints can be used to integrate tighter with the underlying platform.
See also QStyleHints.
Upstream PySide2 reference signatures (binding differences may apply):
styleHints() -> PySide2.QtGui.QStyleHints
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#styleHints
sync
sync() -> None
X.sync()
Supplemental documentation: Qt 5 reference:
[static] void QGuiApplication::sync()
Function that can be used to sync Qt state with the Window Systems state.
This function will first empty Qts events by calling QCoreApplication::processEvents(), then the platform plugin will sync up with the windowsystem, and finally Qts events will be delived by another call to QCoreApplication::processEvents();
This function is timeconsuming and its use is discouraged.
This function was introduced in Qt 5.2.
Upstream PySide2 reference signatures (binding differences may apply):
sync() -> None
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#sync
topLevelAt
topLevelAt(pos: Any) -> Any
X.topLevelAt(pos) -> PythonQt.QtGui.QWindow
Supplemental documentation: Qt 5 reference:
[static] QWindow *QGuiApplication::topLevelAt(const QPoint \&pos)
Returns the top level window at the given position pos, if any.
Upstream PySide2 reference signatures (binding differences may apply):
topLevelAt(pos: PySide2.QtCore.QPoint) -> PySide2.QtGui.QWindow
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#topLevelAt
topLevelWindows
topLevelWindows() -> tuple
X.topLevelWindows() -> tuple
Supplemental documentation: Qt 5 reference:
[static] QWindowList QGuiApplication::topLevelWindows()
Returns a list of the top-level windows in the application.
See also allWindows().
Upstream PySide2 reference signatures (binding differences may apply):
topLevelWindows() -> typing.List[PySide2.QtGui.QWindow]
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#topLevelWindows
windowIcon
instance-attribute
windowIcon: QIcon
Qt 5 reference:
windowIcon : QIcon
This property holds the default window icon
Access functions:
| QIcon | windowIcon() |
|---|---|
| void | setWindowIcon(const QIcon \&icon) |
See also QWindow::setIcon() and Setting the Application Icon.
Source: https://doc.qt.io/archives/qt-5.15/qguiapplication.html#windowIcon