Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

something about include file

$
0
0
yesterday I download and install QT-5.3 on my linux(ubuntukylin),today I try to compile my first QT-project. I write the code by VIM like like this : #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();  } I save this file when I finished , and the file’s path is /home/jxf/TestQt then commond: cd /home/jxf/TestQt qmake -project qmake TestQt.pro so far,everything is going well when I used last commond : make the system tell me,“fatal error: QApplication: No such file or directory”, then I try to find answer in inter,and someone tell me put “QT += widgets” in TestQt.pro. I do like this and compile again,but system tell me “fatal error: Qlabel: No such file or directory” this time, others in inernet tell me modify source code file, #include<QtWidgets/QLabel> replace #include<QLabel>, but when I make ,system still tell me fatal error: Qlabel: No such file or directory How can I do….

Viewing all articles
Browse latest Browse all 2113

Trending Articles