yum安装:
1.
yum install qt qt-devel qt-x11 qt-doc qt-demos qt-examples qt-assistant qt-creator qt-config
2.
yum install phonon-devel.x86_64 -y
3.
touch hello.cpp
代码如下:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
4.
qmake-qt4 -project -o hello.pro
5.
qmake-qt4 hello.pro生成makefile
6.make
7.也可用qtcreator进行开发
源码安装:
1.http://download.qt.io/official_releases/qt/5.2/5.2.1/