(3) 下载Qt5.7源码包
http://download.qt.io/official_releases/qt/5.7/5.7.0/submodules/qt-everywhere-opensource-src-5.7.0.tar.gz
http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.8/5.8.0/qt-opensource-linux-x64-5.8.0.run
(2) 以root身份运行安装程序,并安装到合适的目录(/opt或/usr/local)
内容如下:
图一
Configure summary
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: linux-arm-gnueabihf-g++ (arm, CPU features: none detected)
Platform notes:
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
Build options:
Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus doubleconversion enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-pkg-config pcre png poll_ppoll posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config threadsafe-cloexec tslib zlib
Build parts ............ libs
Mode ................... release
Using sanitizer(s)...... none
Using C++ standard ..... c++11
Using gold linker....... no
Using new DTAGS ........ yes
Using PCH .............. yes
Using LTCG ............. no
Target compiler supports:
Neon ................. no
Qt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... no
Support enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
DoubleConversion........ yes (bundled copy)
Evdev .................. yes
FontConfig ............. no
FreeType ............... yes (bundled copy)
Glib ................... no
GStreamer .............. no
GTK platformtheme ...... no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
libinput................ no
Logging backends:
journald ............... no
syslog ............... no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... yes
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... no
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
EGLFS i.MX6 ........ no
EGLFS i.MX6 Wayland. no
EGLFS EGLDevice .... no
EGLFS GBM .......... no
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... no
LinuxFB .............. yes
Mir client............ no
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
tslib .................. yes
udev ................... no
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (bundled copy)
make install
# Uncomment if you wish to use the linux input layer event interface
# module_raw input
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
(6) 配置环境变量,打开/etc/profile文件,并添加如下内容:
export TSLIB_PLUGINDIR=/usr/lib/ts/
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export LD_LIBRARY_PATH=/usr/lib
(2) 解压
tar -zxvf ./lib.tar.zip
(3) 复制./lib下的所有文件到/usr/lib目录下(4) 配置环境变量,打开/etc/profile文件,并添加如下内容:
export QT_QWS_FONTDIR=/usr/lib/fonts
export QWS_MOUSE_PROTO=/dev/input/event0
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/qt-plugins
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_FONTDIR=/usr/lib/fonts
(1) 进入Qtcreator的工具->选项->构建和运行
图二
(2) 进入添加编译器,选择[添加]->[GCC]->[C++]
图三
(3) 添加[c]和调试器[gdb]参考第二步(4) [Qt Versions]->[添加]
图四
(5) [kit] -> [添加],使用刚才添加的gcc、g++、gdb。
图五