Skip to content

PythonQt.QtGui.QWindow · declarations 003

Back to PythonQt.QtGui.QWindow

setFramePosition

setFramePosition(point: Any) -> None

X.setFramePosition(point)

Supplemental documentation: Qt 5 reference:

void QWindow::setFramePosition(const QPoint \&point)

Sets the upper left position of the window (point) including its window frame.

The position is in relation to the virtualGeometry() of its screen.

See also framePosition(), setGeometry(), and frameGeometry().

Upstream PySide2 reference signatures (binding differences may apply):

setFramePosition(self, point: PySide2.QtCore.QPoint) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setFramePosition

setGeometry

setGeometry(posx: Any, posy: Any, w: Any, h: Any) -> None

X.setGeometry(posx, posy, w, h)

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::setGeometry(const QRect \&rect)

Sets the geometry of the window, excluding its window frame, to rect.

The geometry is in relation to the virtualGeometry() of its screen.

See also geometry().

[slot] void QWindow::setGeometry(int posx, int posy, int w, int h)

Sets the geometry of the window, excluding its window frame, to a rectangle constructed from posx, posy, w and h.

The geometry is in relation to the virtualGeometry() of its screen.

See also geometry().

Upstream PySide2 reference signatures (binding differences may apply):

setGeometry(self, posx: int, posy: int, w: int, h: int) -> None
setGeometry(self, rect: PySide2.QtCore.QRect) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setGeometry

setHeight

setHeight(arg: int) -> None

X.setHeight(arg)

Upstream PySide2 reference signatures (binding differences may apply):

setHeight(self, arg: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setHeight

setIcon

setIcon(icon: Any) -> None

X.setIcon(icon)

Supplemental documentation: Qt 5 reference:

void QWindow::setIcon(const QIcon \&icon)

Sets the window's icon in the windowing system

The window icon might be used by the windowing system for example to decorate the window, and/or in the task switcher.

Note: On macOS, the window title bar icon is meant for windows representing documents, and will only show up if a file path is also set.

See also icon() and setFilePath().

Upstream PySide2 reference signatures (binding differences may apply):

setIcon(self, icon: PySide2.QtGui.QIcon) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setIcon

setKeyboardGrabEnabled

setKeyboardGrabEnabled(grab: bool) -> bool

X.setKeyboardGrabEnabled(grab) -> bool

Supplemental documentation: Qt 5 reference:

bool QWindow::setKeyboardGrabEnabled(bool grab)

Sets whether keyboard grab should be enabled or not (grab).

If the return value is true, the window receives all key events until setKeyboardGrabEnabled(false) is called; other windows get no key events at all. Mouse events are not affected. Use setMouseGrabEnabled() if you want to grab that.

See also setMouseGrabEnabled().

Upstream PySide2 reference signatures (binding differences may apply):

setKeyboardGrabEnabled(self, grab: bool) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setKeyboardGrabEnabled

setMask

setMask(region: Any) -> None

X.setMask(region)

Supplemental documentation: Qt 5 reference:

void QWindow::setMask(const QRegion \&region)

Sets the mask of the window.

The mask is a hint to the windowing system that the application does not want to receive mouse or touch input outside the given region.

The window manager may or may not choose to display any areas of the window not included in the mask, thus it is the application's responsibility to clear to transparent the areas that are not part of the mask.

See also mask().

Upstream PySide2 reference signatures (binding differences may apply):

setMask(self, region: PySide2.QtGui.QRegion) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMask

setMaximumHeight

setMaximumHeight(h: int) -> None

X.setMaximumHeight(h)

Upstream PySide2 reference signatures (binding differences may apply):

setMaximumHeight(self, h: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMaximumHeight

setMaximumSize

setMaximumSize(size: Any) -> None

X.setMaximumSize(size)

Supplemental documentation: Qt 5 reference:

void QWindow::setMaximumSize(const QSize \&size)

Sets the maximum size of the window.

This is a hint to the window manager to prevent resizing above the specified size.

See also setMinimumSize() and maximumSize().

Upstream PySide2 reference signatures (binding differences may apply):

setMaximumSize(self, size: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMaximumSize

setMaximumWidth

setMaximumWidth(w: int) -> None

X.setMaximumWidth(w)

Upstream PySide2 reference signatures (binding differences may apply):

setMaximumWidth(self, w: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMaximumWidth

setMinimumHeight

setMinimumHeight(h: int) -> None

X.setMinimumHeight(h)

Upstream PySide2 reference signatures (binding differences may apply):

setMinimumHeight(self, h: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMinimumHeight

setMinimumSize

setMinimumSize(size: Any) -> None

X.setMinimumSize(size)

Supplemental documentation: Qt 5 reference:

void QWindow::setMinimumSize(const QSize \&size)

Sets the minimum size of the window.

This is a hint to the window manager to prevent resizing below the specified size.

See also setMaximumSize() and minimumSize().

Upstream PySide2 reference signatures (binding differences may apply):

setMinimumSize(self, size: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMinimumSize

setMinimumWidth

setMinimumWidth(w: int) -> None

X.setMinimumWidth(w)

Upstream PySide2 reference signatures (binding differences may apply):

setMinimumWidth(self, w: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMinimumWidth

setModality

setModality(modality: Any) -> None

X.setModality(modality)

Upstream PySide2 reference signatures (binding differences may apply):

setModality(self, modality: PySide2.QtCore.Qt.WindowModality) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setModality

setMouseGrabEnabled

setMouseGrabEnabled(grab: bool) -> bool

X.setMouseGrabEnabled(grab) -> bool

Supplemental documentation: Qt 5 reference:

bool QWindow::setMouseGrabEnabled(bool grab)

Sets whether mouse grab should be enabled or not (grab).

If the return value is true, the window receives all mouse events until setMouseGrabEnabled(false) is called; other windows get no mouse events at all. Keyboard events are not affected. Use setKeyboardGrabEnabled() if you want to grab that.

See also setKeyboardGrabEnabled().

Upstream PySide2 reference signatures (binding differences may apply):

setMouseGrabEnabled(self, grab: bool) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setMouseGrabEnabled

setOpacity

setOpacity(level: float) -> None

X.setOpacity(level)

Upstream PySide2 reference signatures (binding differences may apply):

setOpacity(self, level: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setOpacity

setParent

setParent(parent: Any) -> None

X.setParent(parent)

Supplemental documentation: Qt 5 reference:

void QWindow::setParent(QWindow *parent)

Sets the parent Window. This will lead to the windowing system managing the clip of the window, so it will be clipped to the parent window.

Setting parent to be nullptr will make the window become a top level window.

If parent is a window created by fromWinId(), then the current window will be embedded inside parent, if the platform supports it.

See also parent().

Upstream PySide2 reference signatures (binding differences may apply):

setParent(self, parent: PySide2.QtCore.QObject) -> None
setParent(self, parent: PySide2.QtGui.QWindow) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setParent

setPosition

setPosition(posx: Any, posy: Any) -> None

X.setPosition(posx, posy)

Supplemental documentation: Qt 5 reference:

void QWindow::setPosition(const QPoint \&pt)

set the position of the window on the desktop to pt

The position is in relation to the virtualGeometry() of its screen.

For interactively moving windows, see startSystemMove(). For interactively resizing windows, see startSystemResize().

See also position() and startSystemMove().

void QWindow::setPosition(int posx, int posy)

set the position of the window on the desktop to posx, posy

The position is in relation to the virtualGeometry() of its screen.

See also position().

Upstream PySide2 reference signatures (binding differences may apply):

setPosition(self, posx: int, posy: int) -> None
setPosition(self, pt: PySide2.QtCore.QPoint) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setPosition

setScreen

setScreen(screen: Any) -> None

X.setScreen(screen)

Supplemental documentation: Qt 5 reference:

void QWindow::setScreen(QScreen *newScreen)

Sets the screen on which the window should be shown.

If the window has been created, it will be recreated on the newScreen.

Note: If the screen is part of a virtual desktop of multiple screens, the window will not move automatically to newScreen. To place the window relative to the screen, use the screen's topLeft() position.

This function only works for top level windows.

See also screen() and QScreen::virtualSiblings().

Upstream PySide2 reference signatures (binding differences may apply):

setScreen(self, screen: PySide2.QtGui.QScreen) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setScreen

setSizeIncrement

setSizeIncrement(size: Any) -> None

X.setSizeIncrement(size)

Supplemental documentation: Qt 5 reference:

void QWindow::setSizeIncrement(const QSize \&size)

Sets the size increment (size) of the window.

When the user resizes the window, the size will move in steps of sizeIncrement().width() pixels horizontally and sizeIncrement().height() pixels vertically, with baseSize() as the basis.

By default, this property contains a size with zero width and height.

The windowing system might not support size increments.

See also sizeIncrement(), setBaseSize(), setMinimumSize(), and setMaximumSize().

Upstream PySide2 reference signatures (binding differences may apply):

setSizeIncrement(self, size: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setSizeIncrement

setSurfaceType

setSurfaceType(surfaceType: Any) -> None

X.setSurfaceType(surfaceType)

Supplemental documentation: Qt 5 reference:

void QWindow::setSurfaceType(QSurface::SurfaceType surfaceType)

Sets the surfaceType of the window.

Specifies whether the window is meant for raster rendering with QBackingStore, or OpenGL rendering with QOpenGLContext.

The surfaceType will be used when the native surface is created in the create() function. Calling this function after the native surface has been created requires calling destroy() and create() to release the old native surface and create a new one.

See also surfaceType(), QBackingStore, QOpenGLContext, create(), and destroy().

Upstream PySide2 reference signatures (binding differences may apply):

setSurfaceType(self, surfaceType: PySide2.QtGui.QSurface.SurfaceType) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setSurfaceType

setTitle

setTitle(a: Any) -> None

X.setTitle(a)

Upstream PySide2 reference signatures (binding differences may apply):

setTitle(self, arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setTitle

setTransientParent

setTransientParent(parent: Any) -> None

X.setTransientParent(parent)

Upstream PySide2 reference signatures (binding differences may apply):

setTransientParent(self, parent: PySide2.QtGui.QWindow) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setTransientParent

setVisibility

setVisibility(v: Any) -> None

X.setVisibility(v)

Upstream PySide2 reference signatures (binding differences may apply):

setVisibility(self, v: PySide2.QtGui.QWindow.Visibility) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setVisibility

setVisible

setVisible(visible: bool) -> None

X.setVisible(visible)

Upstream PySide2 reference signatures (binding differences may apply):

setVisible(self, visible: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setVisible

setWidth

setWidth(arg: int) -> None

X.setWidth(arg)

Upstream PySide2 reference signatures (binding differences may apply):

setWidth(self, arg: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setWidth

setWindowState

setWindowState(state: Any) -> None

X.setWindowState(state)

Supplemental documentation: Qt 5 reference:

void QWindow::setWindowState(Qt::WindowState state)

set the screen-occupation state of the window

The window state represents whether the window appears in the windowing system as maximized, minimized, fullscreen, or normal.

The enum value Qt::WindowActive is not an accepted parameter.

See also windowState(), showNormal(), showFullScreen(), showMinimized(), showMaximized(), and setWindowStates().

Upstream PySide2 reference signatures (binding differences may apply):

setWindowState(self, state: PySide2.QtCore.Qt.WindowState) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setWindowState

setX

setX(arg: int) -> None

X.setX(arg)

Upstream PySide2 reference signatures (binding differences may apply):

setX(self, arg: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setX

setY

setY(arg: int) -> None

X.setY(arg)

Upstream PySide2 reference signatures (binding differences may apply):

setY(self, arg: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#setY

show

show() -> None

X.show()

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::show()

Shows the window.

This is equivalent to calling showFullScreen(), showMaximized(), or showNormal(), depending on the platform's default behavior for the window type and flags.

See also showFullScreen(), showMaximized(), showNormal(), hide(), QStyleHints::showIsFullScreen(), and flags().

Upstream PySide2 reference signatures (binding differences may apply):

show(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#show

showEvent

showEvent(arg__1: Any) -> None

X.showEvent(arg__1)

Supplemental documentation: Qt 5 reference:

[virtual protected] void QWindow::showEvent(QShowEvent *ev)

Override this to handle show events (ev).

The function is called when the window has requested becoming visible.

If the window is successfully shown by the windowing system, this will be followed by a resize and an expose event.

Upstream PySide2 reference signatures (binding differences may apply):

showEvent(self, arg__1: PySide2.QtGui.QShowEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#showEvent

showFullScreen

showFullScreen() -> None

X.showFullScreen()

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::showFullScreen()

Shows the window as fullscreen.

Equivalent to calling setWindowStates(Qt::WindowFullScreen) and then setVisible(true).

See the QWidget::showFullScreen() documentation for platform-specific considerations and limitations.

See also setWindowStates() and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

showFullScreen(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#showFullScreen

showMaximized

showMaximized() -> None

X.showMaximized()

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::showMaximized()

Shows the window as maximized.

Equivalent to calling setWindowStates(Qt::WindowMaximized) and then setVisible(true).

See also setWindowStates() and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

showMaximized(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#showMaximized

showMinimized

showMinimized() -> None

X.showMinimized()

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::showMinimized()

Shows the window as minimized.

Equivalent to calling setWindowStates(Qt::WindowMinimized) and then setVisible(true).

See also setWindowStates() and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

showMinimized(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#showMinimized

showNormal

showNormal() -> None

X.showNormal()

Supplemental documentation: Qt 5 reference:

[slot] void QWindow::showNormal()

Shows the window as normal, i.e. neither maximized, minimized, nor fullscreen.

Equivalent to calling setWindowStates(Qt::WindowNoState) and then setVisible(true).

See also setWindowStates() and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

showNormal(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#showNormal

size

size() -> Any

X.size() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

[override virtual] QSize QWindow::size() const

Reimplements: QSurface::size() const.

Returns the size of the window excluding any window frame

See also resize().

Upstream PySide2 reference signatures (binding differences may apply):

size(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#size

sizeIncrement

sizeIncrement() -> Any

X.sizeIncrement() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QWindow::sizeIncrement() const

Returns the size increment of the window.

See also setSizeIncrement().

Upstream PySide2 reference signatures (binding differences may apply):

sizeIncrement(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#sizeIncrement

startSystemMove

startSystemMove() -> bool

X.startSystemMove() -> bool

Supplemental documentation: Qt 5 reference:

[slot] bool QWindow::startSystemMove()

Start a system-specific move operation

Calling this will start an interactive move operation on the window by platforms that support it. The actual behavior may vary depending on the platform. Usually, it will make the window follow the mouse cursor until a mouse button is released.

On platforms that support it, this method of moving windows is preferred over setPosition, because it allows a more native look-and-feel of moving windows, e.g. letting the window manager snap this window against other windows, or special tiling or resizing behavior with animations when dragged to the edge of the screen. Furthermore, on some platforms such as Wayland, setPosition is not supported, so this is the only way the application can influence its position.

Returns true if the operation was supported by the system.

This function was introduced in Qt 5.15.

Upstream PySide2 reference signatures (binding differences may apply):

startSystemMove(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#startSystemMove

startSystemResize

startSystemResize(edges: Any) -> bool

X.startSystemResize(edges) -> bool

Supplemental documentation: Qt 5 reference:

[slot] bool QWindow::startSystemResize(Qt::Edges edges)

Start a system-specific resize operation

Calling this will start an interactive resize operation on the window by platforms that support it. The actual behavior may vary depending on the platform. Usually, it will make the window resize so that its edge follows the mouse cursor.

On platforms that support it, this method of resizing windows is preferred over setGeometry, because it allows a more native look-and-feel of resizing windows, e.g. letting the window manager snap this window against other windows, or special resizing behavior with animations when dragged to the edge of the screen.

edges should either be a single edge, or two adjacent edges (a corner). Other values are not allowed.

Returns true if the operation was supported by the system.

This function was introduced in Qt 5.15.

Upstream PySide2 reference signatures (binding differences may apply):

startSystemResize(self, edges: PySide2.QtCore.Qt.Edges) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#startSystemResize

surfaceHandle

surfaceHandle() -> int

X.surfaceHandle()

Upstream PySide2 reference signatures (binding differences may apply):

surfaceHandle(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#surfaceHandle

surfaceType

surfaceType() -> Any

X.surfaceType()

Supplemental documentation: Qt 5 reference:

[override virtual] QSurface::SurfaceType QWindow::surfaceType() const

Reimplements: QSurface::surfaceType() const.

Returns the surface type of the window.

See also setSurfaceType().

Upstream PySide2 reference signatures (binding differences may apply):

surfaceType(self) -> PySide2.QtGui.QSurface.SurfaceType

Source: https://doc.qt.io/archives/qt-5.15/qwindow.html#surfaceType