1. 下载并解压安装包

下载:Qt libraries 4.8.4 for Linux/X11

解压:

1
tar xvf qt-everywhere-opensource-src-4.8.4.tar

2. 编译库并安装 Library

1
2
3
4
5
6
7
8
cd qt-everywhere-opensource-src-4.8.4
./configure

//o: opensource

make

make install

3. 设置 QT Creator

  • 选择:工具 - 选项 - 构建并执行

  • 设置QT版本:新增,选择目录

  • 设置 Kits


出现的问题

1. Basic XLib functionality test failed!

错误:

1
2
3
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

解决:

1
sudo apt-get install libX11-dev libXext-dev libXtst-dev