|  | Home · All Classes · Modules

# QX11Info Class Reference
[QtGui module]

The QX11Info class provides information about the X display configuration. More...

### Methods

- __init__ (self)
- __init__ (self, QX11Info other)
- int cells (self)
- int colormap (self)
- bool defaultColormap (self)
- bool defaultVisual (self)
- int depth (self)
- int screen (self)
- sip.voidptr visual (self)

### Static Methods

- int appCells (int screen = -1)
- str appClass ()
- int appColormap (int screen = -1)
- bool appDefaultColormap (int screen = -1)
- bool appDefaultVisual (int screen = -1)
- int appDepth (int screen = -1)
- int appDpiX (int screen = -1)
- int appDpiY (int screen = -1)
- int appRootWindow (int screen = -1)
- int appScreen ()
- int appTime ()
- int appUserTime ()
- sip.voidptr appVisual (int screen = -1)
- Display display ()
- bool isCompositingManagerRunning ()
- setAppDpiX (int screen, int dpi)
- setAppDpiY (int screen, int dpi)
- setAppTime (int time)
- setAppUserTime (int time)

## Detailed Description

The QX11Info class provides information about the X display configuration.

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.

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

## Method Documentation

### QX11Info.__init__ (self)

Constructs an empty QX11Info object.

### QX11Info.__init__ (self, QX11Info other)

Constructs a copy of other.

### int QX11Info.appCells (int screen = -1)

Returns the number of cells used by the application on the given screen.

The 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.

See also cells().

### str QX11Info.appClass ()

Returns the X11 application class.

See also display().

### int QX11Info.appColormap (int screen = -1)

Returns a handle for the application's color map on the given screen.

The 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.

See also colormap() and defaultColormap().

### bool QX11Info.appDefaultColormap (int screen = -1)

Returns true if the application has a default color map on the given screen; otherwise returns false.

The 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.

### bool QX11Info.appDefaultVisual (int screen = -1)

Returns true if the application has a default visual on the given screen; otherwise returns false.

The 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.

### int QX11Info.appDepth (int screen = -1)

Returns the color depth (bits per pixel) used by the application on the given screen.

The 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.

See also depth().

### int QX11Info.appDpiX (int screen = -1)

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

The 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.

See also setAppDpiX() and appDpiY().

### int QX11Info.appDpiY (int screen = -1)

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

The 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.

See also setAppDpiY() and appDpiX().

### int QX11Info.appRootWindow (int screen = -1)

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

The 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.

See also QApplication.desktop().

### int QX11Info.appScreen ()

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

See also display() and screen().

### int QX11Info.appTime ()

Returns the X11 time.

See also setAppTime() and appUserTime().

### int QX11Info.appUserTime ()

Returns the X11 user time.

See also setAppUserTime() and appTime().

### sip.voidptr QX11Info.appVisual (int screen = -1)

Returns the current visual used by the application on the given screen.

The 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.

See also visual() and defaultVisual().

### int QX11Info.cells (self)

Returns the number of cells.

See also appCells().

### int QX11Info.colormap (self)

Returns a handle for the color map.

See also defaultColormap().

### bool QX11Info.defaultColormap (self)

Returns true if there is a default color map; otherwise returns false.

See also colormap().

### bool QX11Info.defaultVisual (self)

Returns true if there is a default visual; otherwise returns false.

See also visual() and appVisual().

### int QX11Info.depth (self)

Returns the color depth (bits per pixel) of the X display.

See also appDepth().

### Display QX11Info.display ()

Returns the default display for the application.

See also appScreen().

### bool QX11Info.isCompositingManagerRunning ()

Returns true if there is a compositing manager running.

This function was introduced in Qt 4.4.

### int QX11Info.screen (self)

Returns the number of the screen currently in use.

The return value 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.

See also appScreen().

### QX11Info.setAppDpiX (int screen, int dpi)

Sets the horizontal resolution of the given screen to the number of dots per inch specified by xdpi.

The 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.

See also appDpiX() and setAppDpiY().

### QX11Info.setAppDpiY (int screen, int dpi)

Sets the vertical resolution of the given screen to the number of dots per inch specified by ydpi.

The 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.

See also appDpiY() and setAppDpiX().

### QX11Info.setAppTime (int time)

Sets the X11 time to the value specified by time.

See also appTime() and setAppUserTime().

### QX11Info.setAppUserTime (int time)

Sets the X11 user time as specified by time.

See also appUserTime() and setAppTime().

### sip.voidptr QX11Info.visual (self)

Returns the current visual.

See also appVisual() and defaultVisual().