linux下qt的安装

时间:2022-11-18 17:54:03

linux下qt的安装

2.1环境的搭建
linux->
2.1.1 ./qt-opensource-linux-x86-5.5.0.run
2.1.2 vim /etc/profile (.bashrc)
export PATH=/home/gec/Qt5.5.0/5.5/gcc/bin:$PATH

验证:关闭终端,再打开 或者source ~/.bashrc
which qmake

首次体验:

#include <QApplication>
#include <QLabel>
int main(int argc, char **argv)
{
QApplication app (argc, argv);

QLabel *hello = new QLabel("Hello Qt!”);

hello->show();

return app.exec();

}
2.qmake -project
--> .pro (工程文件)--> QT +=widgets

3.qmake
--> makefile gcc -L -l -I/
Cxx=
INCPATH= //头文件路径
LIBS= //库

4.make