1. Download qt
http://download.qt.io/
I'm using: qt-everywhere-opensource-src-4.7.3.tar.gz.
2. Unzip and install QT
Recommended decompression to the/use/local directory
#tar jzxf qt-everywhere-opensource-src-4.7.3.tar.gz
Enter the extracted directory
#./configure
#make
#make Install
Default installation to/usr/local/trolltech/qt-4.7.3
3. Modify all user Environment variables
#vi/etc/profile
At the end of it, add the following information:
Export qtdir=/usr/local/trolltech/qt-4.7.3
Export path= $QTDIR/bin: $PATH
Export manpath= $QTDIR/man: $MANPATH
Export ld_library_path= $QTDIR/lib: $LD _library_path
#source/etc/profile
4, if the use of QT Creator
In the tools-"options-" build and run-Qt version manually add/usr/local/trolltech/qt-4.7.3/bin/qmake
Build Kit (kit) to manually set QT version to QT 4.7.3
Reference:http://www.cppblog.com/wanghaiguang/archive/2013/04/08/199216.aspx
(minimalist) Linux installation QT4.7.3