Qt for X11 要求

QtGui Dependencies

Qt for X11 Dependencies

The QtGui module and the QtCore module, which provides the non-GUI features required by QtGui , depend on the libraries described in 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.

名称 注意事项 配置选项 最低工作版本
XRender libXrender X Rendering Extension; used for anti-aliasing -xrender 或自动检测 0.9.0
Xrandr libXrandr X Resize and Rotate Extension -xrandr 或自动检测 1.0.2
Xcursor libXcursor X Cursor Extension -xcursor 或自动检测 1.1.4
Xfixes libXfixes X Fixes Extension -xfixes 或自动检测 3.0.0
Xinerama libXinerama Multi-head support -xinerama 或自动检测 1.1.0
Fontconfig libfontconfig 字体定制和配置 -fontconfig 或自动检测 2.1
FreeType libfreetype 字体引擎 2.1.3
Xi libXi X11 Input Extensions -xinput 或自动检测 1.3.0
Xt libXt Xt Intrinsics 0.99
Xext libXext X 扩展 6.4.3
X11 libX11 X11 Client-Side Library 6.2.1
SM libSM X 会话管理 -sm 或自动检测 6.0.4
ICE libICE ICE (客户端间交换) -sm 或自动检测 6.3.5
glib libglib-2.0 常见事件循环处理 -glib 或自动检测 2.8.3
pthread libpthread 多线程 2.3.5

注意: You must compile with XRender support to get alpha transparency support for pixmaps and images.

这些库开发包包含从其源代码构建 Qt 时使用的头文件。例如,在基于 Debian 的 GNU/Linux 系统,推荐安装以下开发包:

  • libfontconfig1-dev
  • libfreetype6-dev
  • libx11-dev
  • libxcursor-dev
  • libxext-dev
  • libxfixes-dev
  • libxft-dev
  • libxi-dev
  • libxrandr-dev
  • libxrender-dev

这些包中的某些依赖此列表中的其它,因此安装一个可能导致其它被自动安装。其它分布可能为系统包提供类似名称。

OpenGL 依赖

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

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

Phonon Dependencies

作为描述在 Phonon Overview , Phonon uses the GStreamer multimedia framework as the backend for audio and video playback on X11. The minimum required version of GStreamer is 0.10.

To build Phonon, 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 在分发包存储库中查找适合包。

另请参阅 已知问题 .