内容表

上一话题

PySide2.QtX11Extras

下一话题

PySide2.QtXml

QX11Info

提供 X 显示配置的有关信息。 更多

Inheritance diagram of PySide2.QtX11Extras.QX11Info

概要

静态函数

详细描述

The class provides two APIs: a set of non-static functions that provide information about a specific widget or pixmap, and a set of static functions that provide the default information for the application.

警告

This class is only available on X11. For querying per-screen information in a portable way, use QDesktopWidget .

PySide2.QtX11Extras.QX11Info. PeekOption

An enum to tune the behavior of peekEventQueue() .

常量

描述

QX11Info.PeekDefault

Peek from the beginning of the buffered native event queue. A peeker id is optional with . If a peeker id is provided to peekEventQueue() when using , then peeking starts from the beginning of the queue, not from the cached index; thus, this can be used to manually reset a cached index to peek from the start of the queue. When this operation completes, the associated index will be updated to the new position in the queue.

QX11Info.PeekFromCachedIndex

peekEventQueue() can optimize the peeking algorithm by skipping events that it already has seen in earlier calls to peekEventQueue() . When control returns to the main event loop, which causes the buffered native event queue to be flushed to Qt’s event queue, the cached indices are marked invalid and will be reset on the next access. The same is true if the program explicitly flushes the buffered native event queue by processEvents() .

New in version 5.10.

static PySide2.QtX11Extras.QX11Info. appDpiX ( [ screen=-1 ] )
参数

screen int

返回类型

int

Returns the horizontal resolution of the given screen in terms of the number of dots per inch.

screen argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.

另请参阅

appDpiY()

static PySide2.QtX11Extras.QX11Info. appDpiY ( [ screen=-1 ] )
参数

screen int

返回类型

int

Returns the vertical resolution of the given screen in terms of the number of dots per inch.

screen argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.

另请参阅

appDpiX()

static PySide2.QtX11Extras.QX11Info. appRootWindow ( [ screen=-1 ] )
参数

screen int

返回类型

long

Returns a handle for the applications root window on the given screen .

screen argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.

另请参阅

desktop()

static PySide2.QtX11Extras.QX11Info. appScreen ( )
返回类型

int

Returns the number of the screen where the application is being displayed.

This method refers to screens in the original X11 meaning with a different DISPLAY environment variable per screen. This information is only useful if your application needs to know on which X screen it is running.

In a typical multi-head configuration, multiple physical monitors are combined in one X11 screen. This means this method returns the same number for each of the physical monitors. In such a setup you are interested in the monitor information as provided by the X11 RandR extension. This is available through QDesktopWidget and QScreen .

另请参阅

display()

static PySide2.QtX11Extras.QX11Info. appTime ( )
返回类型

long

返回 X11 时间。

static PySide2.QtX11Extras.QX11Info. appUserTime ( )
返回类型

long

返回 X11 用户时间。

static PySide2.QtX11Extras.QX11Info. generatePeekerId ( )
返回类型

qint32

Returns a new peeker id or -1 if some interal error has occurred. Each peeker id is associated with an index in the buffered native event queue.

更多细节见 PeekOption and peekEventQueue() .

另请参阅

peekEventQueue() removePeekerId()

static PySide2.QtX11Extras.QX11Info. getTimestamp ( )
返回类型

long

从 X 服务器抓取当前 X11 时间戳。

This method creates a property notify event and blocks till it is received back from the X Server.

static PySide2.QtX11Extras.QX11Info. isCompositingManagerRunning ( [ screen=-1 ] )
参数

screen int

返回类型

bool

Returns true if there is a compositing manager running for the connection attached to screen .

screen equals -1, the application’s primary screen is used.

static PySide2.QtX11Extras.QX11Info. isPlatformX11 ( )
返回类型

bool

Returns true if the application is currently running on X11.

static PySide2.QtX11Extras.QX11Info. nextStartupId ( )
返回类型

QByteArray

Returns the startup ID that will be used for the next window to be shown by this process.

After the next window is shown, the next startup ID will be empty.

http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt

static PySide2.QtX11Extras.QX11Info. removePeekerId ( peekerId )
参数

peekerId qint32

返回类型

bool

移除 peekerId , which was earlier obtained via generatePeekerId() .

返回 true on success or false if unknown peeker id was provided or some interal error has occurred.

static PySide2.QtX11Extras.QX11Info. setAppTime ( time )
参数

time – long

Sets the X11 time to the value specified by time .

static PySide2.QtX11Extras.QX11Info. setAppUserTime ( time )
参数

time – long

Sets the X11 user time as specified by time .

static PySide2.QtX11Extras.QX11Info. setNextStartupId ( id )
参数

id QByteArray

Sets the next startup ID to id .

This is the startup ID that will be used for the next window to be shown by this process.

The startup ID of the first window comes from the environment variable DESKTOP_STARTUP_ID. This method is useful for subsequent windows, when the request comes from another process (e.g. via DBus).

另请参阅

nextStartupId()