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.

It's possible to configure Qt with -qt-xcb, which compiles in a set of xcb helper libraries instead of trying to link against the system versions. This can help make Qt less dependent on some of the xcb helper libraries that might not be available on all distributions. The table specifies which dependencies are provided by -qt-xcb.

NameLibraryNotesConfiguration optionsMinimum working version
XRenderlibXrenderX Rendering Extension; used for anti-aliasing and alpha cursor support-xrender or auto-detected0.9.0
xcb-renderlibxcb-renderX C Bindings for Render extensionauto-detected or provided by -qt-xcb1.8.1
xcb-render-utillibxcb-render-utilUtility library for XCB for Render extensionauto-detected or provided by -qt-xcb0.3.8
xcb-shapelibxcb-shapeX C Bindings for Shape extensionauto-detected or provided by -qt-xcb1.8.1
xcb-randrlibxcb-randrX C Bindings for Resize and Rotate Extensionauto-detected or provided by -qt-xcb1.8.1
xcb-xfixeslibxcb-xfixesX C Bindings for Fixes Extensionauto-detected or provided by -qt-xcb1.8.1
xcb-synclibxcb-syncX C Bindings for Sync Extensionauto-detected or provided by -qt-xcb1.8.1
xcb-shmlibxcb-shmX C Bindings for Shared Memory Extensionauto-detected or provided by -qt-xcb1.8.1
xcb-icccmlibxcb-icccmX C Bindings for ICCCM Protocolauto-detected or provided by -qt-xcb0.3.9
xcb-keysymslibxcb-keysymsUtility library for XCB for keycode conversionauto-detected or provided by -qt-xcb0.3.9
xcb-imagelibxcb-imageUtility library for XCB for XImage and XShmImage, used for QBackingStore and cursor supportauto-detected or provided by -qt-xcb0.3.9
FontconfiglibfontconfigFont customization and configuration-fontconfig or auto-detected2.1
FreeTypelibfreetypeFont engine2.1.3
XilibXiX11 Input Extensions-xinput or auto-detected1.3.0
XextlibXextX Extensions6.4.3
X11libX11X11 client-side library6.2.1
xcblibxcbX C Binding library1.8.1
X11-xcblibX11-xcbXlib/XCB interface library1.3.2
SMlibSMX Session Management-sm or auto-detected6.0.4
ICElibICEInter-Client Exchange-sm or auto-detected6.3.5
gliblibglib-2.0Common event loop handling-glib or auto-detected2.8.3

Development packages for these libraries contain header files that are used when building Qt from its source code. On Debian-based GNU/Linux systems, for example, we recommend that you install the following development packages:

  • libfontconfig1-dev
  • libfreetype6-dev
  • libx11-dev
  • libxext-dev
  • libxfixes-dev
  • libxi-dev
  • libxrender-dev
  • libxcb1-dev
  • libx11-xcb-dev
  • libxcb-glx0-dev

Additionally, if you do not configure with -qt-xcb, you should also install these development packages:

  • libxcb-keysyms1-dev
  • libxcb-image0-dev
  • libxcb-shm0-dev
  • libxcb-icccm4-dev
  • libxcb-sync0-dev
  • libxcb-xfixes0-dev
  • libxcb-shape0-dev
  • libxcb-randr0-dev
  • libxcb-render-util0-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.

OpenGL Dependencies

The configure script will autodetect if OpenGL headers and libraries are installed on your system, and if so, it will include the Qt OpenGL module in the Qt library.

If your OpenGL headers or libraries are placed in a non-standard directory, you may need to change the QMAKE_INCDIR_OPENGL and/or QMAKE_LIBDIR_OPENGL in the config file for your system.

The QGL documentation assumes that you are familiar with OpenGL programming. If you're new to the subject a good starting point is http://www.opengl.org/.

Multimedia Dependencies

As described in the Multimedia overview, Qt Multimedia uses the GStreamer multimedia framework as the backend for audio and video playback on Linux. The minimum required version of GStreamer is 0.10.

To build Qt Multimedia, you need the GStreamer library, base plugins, and development files for your system. The package names for GStreamer vary between Linux distributions; try searching for gstreamer or libgstreamer in your distribution's package repository to find suitable packages.

Qt WebKit Dependencies

Qt WebKit depends on some extra development tools in addition to those required for the rest of Qt.

Note: These dependencies are only needed if you use a source version of Qt. They are not required when using a prebuilt library.

  • gperf
  • bison
  • flex (v2.5.33 or later)
  • sqlite (development version)
  • fontconfig (development version)
  • xrender (development version)
  • gstreamer (development version)

These should be available in most major Linux distributions, but the exact install instructions will vary.

For the most up to date information about Qt WebKit dependencies, please refer to the Qt WebKit wiki for Linux

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.