- Qt 6.9
- Product information
- Supported Platforms
- Qt for Linux/X11
- Qt for X11 Requirements
- Qt 6.9.0 Reference Documentation

Qt for Linux/X11 ◦ Building from source

# Qt for X11 Requirements

## Platform Plugin Dependencies

On Linux, the xcb QPA (Qt Platform Abstraction) platform plugin is used. It provides the basic functionality needed by Qt GUI and Qt Widgets to run against X11. Its library dependencies are described the following table. To build Qt from its source code, you will also need to install the development packages for these libraries for your system.

Name | Library | Notes | Configuration options | Minimum working version
--- | --- | --- | --- | ---
XRender | libXrender | X Rendering Extension; used for anti-aliasing and alpha cursor support | `-xrender` or auto-detected | 0.9.0
xcb-render | libxcb-render | X C Bindings for Render extension | auto-detected | 1.11
xcb-render-util | libxcb-render-util | Utility library for XCB for Render extension | auto-detected | 0.3.9
xcb-shape | libxcb-shape | X C Bindings for Shape extension | auto-detected | 1.11
xcb-randr | libxcb-randr | X C Bindings for Resize and Rotate Extension | auto-detected | 1.11
xcb-xfixes | libxcb-xfixes | X C Bindings for Fixes Extension | auto-detected | 1.11
xcb-xkb | libxcb-xkb | X C Bindings for XKeyboard Extension | auto-detected | 1.11
xcb-sync | libxcb-sync | X C Bindings for Sync Extension | auto-detected | 1.11
xcb-shm | libxcb-shm | X C Bindings for Shared Memory Extension | auto-detected | 1.11
xcb-icccm | libxcb-icccm | X C Bindings for ICCCM Protocol | auto-detected | 0.3.9
xcb-keysyms | libxcb-keysyms | Utility library for XCB for keycode conversion | auto-detected | 0.3.9
xcb-image | libxcb-image | Utility library for XCB for XImage and XShmImage, used for QBackingStore and cursor support | auto-detected | 0.3.9
xcb-util | libxcb-util | Utility library for XCB for atom, aux and event | auto-detected | 0.3.9
xcb-cursor0 | libxcb-cursor0 | Utility library for XCB for cursor | auto-detected | 0.1.1
xkbcommon | libxkbcommon | Keymap handling | `-xkbcommon` or auto-detected | 0.5.0
xkbcommon-x11 | libxkbcommon-x11 | Keymap handling | auto-detected | 0.5.0
Fontconfig | libfontconfig | Font customization and configuration | `-fontconfig` or auto-detected | 2.6
FreeType | libfreetype | Font engine |  | 2.3.0
Xext | libXext | X Extensions |  | 6.4.3
X11 | libX11 | X11 client-side library |  | 6.2.1
xcb | libxcb | X C Binding library |  | 1.11
X11-xcb | libX11-xcb | Xlib/XCB interface library |  | 1.3.2
SM | libSM | X Session Management | `-sm` or auto-detected | 6.0.4
ICE | libICE | Inter-Client Exchange | `-sm` or auto-detected | 6.3.5
glib | libglib-2.0 | Common event loop handling | `-glib` or auto-detected | 2.8.3
pthread | libpthread | Multithreading |  | 2.3.5

Development packages for the above libraries contain header files that are used when building Qt from its source code. The package names may differ among Linux distributions, and some distributions may not include all packages in the default configuration for their package management system.

As an example, you can run the following command to install the recommended packages on Debian-based GNU/Linux systems:

     apt install \
         libfontconfig1-dev \
         libfreetype-dev \
         libgtk-3-dev \
         libx11-dev \
         libx11-xcb-dev \
         libxcb-cursor-dev \
         libxcb-glx0-dev \
         libxcb-icccm4-dev \
         libxcb-image0-dev \
         libxcb-keysyms1-dev \
         libxcb-randr0-dev \
         libxcb-render-util0-dev \
         libxcb-shape0-dev \
         libxcb-shm0-dev \
         libxcb-sync-dev \
         libxcb-util-dev \
         libxcb-xfixes0-dev \
         libxcb-xinerama0-dev \
         libxcb-xkb-dev \
         libxcb1-dev \
         libxext-dev \
         libxfixes-dev \
         libxi-dev \
         libxkbcommon-dev \
         libxkbcommon-x11-dev \
         libxrender-dev

Some of these packages depend on others in this list, so installing one may cause others to be automatically installed. Other distributions may provide system packages with similar names.

Qt does not maintain a comprehensive package list for all distributions. Some distributions, such as Red Hat and its derivatives, may require additional repositories for certain packages (e.g., EPEL for RHEL). Consult your distribution's documentation for specific package names. RHEL users can contact Red Hat support for detailed information.

## Accessibility Dependencies

The Qt accessibility implementation uses the Assistive Technology Service Provider Interface (AT-SPI). Besides DBUS, the development package `libatspi2.0-dev` must be installed.

## OpenGL Dependencies

Configure attempts to automatically detect OpenGL ES 2.0, or later, or regular desktop OpenGL. You can disable OpenGL support by using the `-no-opengl` option.

Note: The Qt OpenGL module (which contains classes that start with QGL) has been deprecated in favor of the Qt GUI module (which contains classes that start with QOpenGL).

## QDoc Dependencies

QDoc uses Clang to parse C++ code. If you wish to build QDoc manually, refer to Installing Clang for QDoc for specific build requirements.

Qt for Linux/X11 ◦ Building from source