一、查看系统是否已装QT
which moc
which uic
which assistant
which designer
如果qmake所在的系统目录中存在上述可执行文件,则表明QT已经安装成功并且可以使用了。
二、安装
sudo apt-get install libqt4-dev
sudo apt-get install libqt4-gui
sudo apt-get install libqt4-sql
sudo apt-get install qt4-designer
sudo apt-get install qt4-dev-tools
sudo apt-get install qt4-doc
sudo apt-get install libqt4-designer
三、设置QTDIR等环境变量
export QTDIR=/usr/share/qt4
export QTINC=/usr/share/qt4/include
export QTLIB=/usr/share/qt4/lib
export PATH=$QTDIR/bin:$PATH
apt-get install g++ qt4-dev-tools
apt-get install libqt4-dev
apt-get install libqt4-dev-kdecopy
apt-get install qt3-dev-tools