Class: QgsScreenHelper

A utility class for dynamic handling of changes to screen properties.

Added in version 3.28.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsScreenHelper

Base classes

QObject

class qgis.gui.QgsScreenHelper[source]

Bases: QObject

__init__(parent: QWidget | None)

Constructor for QgsScreenHelper for the specified parent widget.

Parameters:

parent (Optional[QWidget])

availableGeometry(self) QRect[source]

Returns the current screen available geometry in pixels.

The available geometry is the geometry excluding window manager reserved areas such as task bars and system menus.

Return type:

QRect

signal availableGeometryChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

screen(self) QScreen | None[source]

Returns the screen that the parent widget appears on, or None.

Return type:

Optional[QScreen]

screenDpi(self) float[source]

Returns the current screen DPI for the screen that the parent widget appears on.

Return type:

float

signal screenDpiChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

windowHandle(self) QWindow | None[source]

Returns the window handle for the window the parent widget is associated with, or None.

Return type:

Optional[QWindow]