Skip to content

PythonQt.QtGui.QApplication · declarations 001

Back to PythonQt.QtGui.QApplication

ColorSpec instance-attribute

ColorSpec: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

CustomColor instance-attribute

CustomColor: Any

ManyColor instance-attribute

ManyColor: Any

NormalColor instance-attribute

NormalColor: Any

aboutQt

aboutQt() -> None

X.aboutQt()

Supplemental documentation: Qt 5 reference:

[static slot] void QApplication::aboutQt()

Displays a simple message box about Qt. The message includes the version number of Qt being used by the application.

This is useful for inclusion in the Help menu of an application, as shown in the Menus example.

This function is a convenience slot for QMessageBox::aboutQt().

Upstream PySide2 reference signatures (binding differences may apply):

aboutQt() -> None

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#aboutQt

aboutToQuit

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

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

activeModalWidget

activeModalWidget() -> Any

X.activeModalWidget() -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

[static] QWidget *QApplication::activeModalWidget()

Returns the active modal widget.

A modal widget is a special top-level widget which is a subclass of QDialog that specifies the modal parameter of the constructor as true. A modal widget must be closed before the user can continue with other parts of the program.

Modal widgets are organized in a stack. This function returns the active modal widget at the top of the stack.

See also activePopupWidget() and topLevelWidgets().

Upstream PySide2 reference signatures (binding differences may apply):

activeModalWidget() -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#activeModalWidget

activePopupWidget

activePopupWidget() -> Any

X.activePopupWidget() -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

[static] QWidget *QApplication::activePopupWidget()

Returns the active popup widget.

A popup widget is a special top-level widget that sets the Qt::WType_Popup widget flag, e.g. the QMenu widget. When the application opens a popup widget, all events are sent to the popup. Normal widgets and modal widgets cannot be accessed before the popup widget is closed.

Only other popup widgets may be opened when a popup widget is shown. The popup widgets are organized in a stack. This function returns the active popup widget at the top of the stack.

See also activeModalWidget() and topLevelWidgets().

Upstream PySide2 reference signatures (binding differences may apply):

activePopupWidget() -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#activePopupWidget

activeWindow

activeWindow() -> Any

X.activeWindow() -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

[static] QWidget *QApplication::activeWindow()

Returns the application top-level window that has the keyboard input focus, or nullptr if no application window has the focus. There might be an activeWindow() even if there is no focusWidget(), for example if no widget in that window accepts key events.

See also setActiveWindow(), QWidget::setFocus(), QWidget::hasFocus(), and focusWidget().

Upstream PySide2 reference signatures (binding differences may apply):

activeWindow() -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#activeWindow

addLibraryPath

addLibraryPath(arg__1: Any) -> Any

X.addLibraryPath(arg__1)

alert

alert(widget: Any, duration: int) -> None

X.alert(widget, duration)

Supplemental documentation: Qt 5 reference:

[static] void QApplication::alert(QWidget *widget, int msec \= 0)

Causes an alert to be shown for widget if the window is not the active window. The alert is shown for msec milliseconds. If msec is zero (the default), then the alert is shown indefinitely until the window becomes active again.

Currently this function does nothing on Qt for Embedded Linux.

On macOS, this works more at the application level and will cause the application icon to bounce in the dock.

On Windows, this causes the window's taskbar entry to flash for a time. If msec is zero, the flashing will stop and the taskbar entry will turn a different color (currently orange).

On X11, this will cause the window to be marked as "demands attention", the window must not be hidden (i.e. not have hide() called on it, but be visible in some sort of way) in order for this to work.

This function was introduced in Qt 4.3.

Upstream PySide2 reference signatures (binding differences may apply):

alert(widget: PySide2.QtWidgets.QWidget, duration: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#alert

allWidgets

allWidgets() -> tuple

X.allWidgets() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QWidgetList QApplication::allWidgets()

Returns a list of all the widgets in the application.

The list is empty (QList::isEmpty()) if there are no widgets.

Note: Some of the widgets may be hidden.

Example:

void updateAllWidgets()
{
    const QWidgetList allWidgets = QApplication::allWidgets();
    for (QWidget *widget : allWidgets)
        widget->update();
}

See also topLevelWidgets() and QWidget::isVisible().

Upstream PySide2 reference signatures (binding differences may apply):

allWidgets() -> typing.List[PySide2.QtWidgets.QWidget]

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#allWidgets

allWindows

allWindows() -> tuple

X.allWindows() -> tuple

applicationDirPath

applicationDirPath() -> str

X.applicationDirPath() -> str

applicationDisplayName instance-attribute

applicationDisplayName: Any

applicationDisplayNameChanged

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

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

applicationFilePath

applicationFilePath() -> str

X.applicationFilePath() -> str

applicationName instance-attribute

applicationName: Any

applicationNameChanged

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

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

applicationPid

applicationPid() -> int

X.applicationPid() -> int

applicationStateChanged

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

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

applicationVersion instance-attribute

applicationVersion: Any

applicationVersionChanged

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

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

arguments

arguments() -> tuple

X.arguments() -> tuple

autoSipEnabled instance-attribute

autoSipEnabled: bool

Qt 5 reference:

autoSipEnabled : bool

toggles automatic SIP (software input panel) visibility

Set this property to true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with the WA_InputMethodEnabled attribute set, and is typically used to launch a virtual keyboard on devices which have very few or no keys.

The property only has an effect on platforms that use software input panels.

The default is platform dependent.

This property was introduced in Qt 4.5.

Access functions:

bool autoSipEnabled() const
void setAutoSipEnabled(const bool enabled)

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#autoSipEnabled

beep

beep() -> None

X.beep()

Supplemental documentation: Qt 5 reference:

[static] void QApplication::beep()

Sounds the bell, using the default volume and sound. The function is not available in Qt for Embedded Linux.

Upstream PySide2 reference signatures (binding differences may apply):

beep() -> None

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#beep

changeOverrideCursor

changeOverrideCursor(arg__1: Any) -> Any

X.changeOverrideCursor(arg__1)

clipboard

clipboard() -> Any

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

closeAllWindows

closeAllWindows() -> None

X.closeAllWindows()

Supplemental documentation: Qt 5 reference:

[static slot] void QApplication::closeAllWindows()

Closes all top-level windows.

This function is particularly useful for applications with many top-level windows. It could, for example, be connected to a Exit entry in the File menu:

    const QIcon exitIcon = QIcon::fromTheme("application-exit");
    QAction *exitAct = fileMenu->addAction(exitIcon, tr("E&xit"), qApp, &QApplication::closeAllWindows);
    exitAct->setShortcuts(QKeySequence::Quit);
    exitAct->setStatusTip(tr("Exit the application"));
    fileMenu->addAction(exitAct);

The windows are closed in random order, until one window does not accept the close event. The application quits when the last window was successfully closed; this can be turned off by setting quitOnLastWindowClosed to false.

See also quitOnLastWindowClosed, lastWindowClosed(), QWidget::close(), QWidget::closeEvent(), lastWindowClosed(), QCoreApplication::quit(), topLevelWidgets(), and QWidget::isWindow().

Upstream PySide2 reference signatures (binding differences may apply):

closeAllWindows() -> None

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#closeAllWindows

closingDown

closingDown() -> bool

X.closingDown() -> bool

colorSpec

colorSpec() -> int

X.colorSpec() -> int

Upstream PySide2 reference signatures (binding differences may apply):

colorSpec() -> int

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#colorSpec

commitDataRequest

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

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

cursorFlashTime instance-attribute

cursorFlashTime: int

Qt 5 reference:

cursorFlashTime : int

This property holds the text cursor's flash (blink) time in milliseconds

The flash time is the time required to display, invert and restore the caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time, but this may vary.

The default value on X11 is 1000 milliseconds. On Windows, the Control Panel value is used and setting this property sets the cursor flash time for all applications.

We recommend that widgets do not cache this value as it may change at any time if the user changes the global desktop settings.

Note: This property may hold a negative value, for instance if cursor blinking is disabled.

Access functions:

int cursorFlashTime()
void setCursorFlashTime(int)

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#cursorFlashTime

desktop

desktop() -> Any

X.desktop() -> PythonQt.QtGui.QDesktopWidget

Upstream PySide2 reference signatures (binding differences may apply):

desktop() -> PySide2.QtWidgets.QDesktopWidget

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#desktop

desktopFileName instance-attribute

desktopFileName: Any

desktopSettingsAware

desktopSettingsAware() -> bool

X.desktopSettingsAware() -> bool

destroyed

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

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

devicePixelRatio

devicePixelRatio() -> float

X.devicePixelRatio() -> float

doubleClickInterval instance-attribute

doubleClickInterval: int

Qt 5 reference:

doubleClickInterval : int

This property holds the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks

The default value on X11 is 400 milliseconds. On Windows and Mac OS, the operating system's value is used.

Access functions:

int doubleClickInterval()
void setDoubleClickInterval(int)

Source: https://doc.qt.io/archives/qt-5.15/qapplication.html#doubleClickInterval

event

event(arg__1: Any) -> bool

X.event(arg__1) -> bool

Supplemental documentation: Qt 5 reference:

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

Reimplements: QGuiApplication::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/qapplication.html#event