QT Classic error message qapplication:no such file or directory
This error message is generally the first example of QT programming when a novice compiles Qt5 first application "Hello,world". are
It's easy to say.
#include <QApplication>
#include <QWidget>
int main (int argc, char *argv[])
{
Qapplication app (ARGC,ARGV);
Qwidget *ww=new qwidget ();
Ww->resize (300,200);
Ww->show ();
return App.exec ();
}
A compilation result appeared above this error, that call a depressed.
In fact, spend a bit of mind to follow the hint, novice also can solve their own problems. The method is also very simple, that is, after performing the following two steps
Qmake-project
Qmake
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/83/wKioL1TV0kTBXfg8AADW-gvLOVE886.jpg "title=" CMD Terminal compilation QT5 failed resolution 1.JPG "alt=" Wkiol1tv0ktbxfg8aadw-gvlove886.jpg "/>
Immediately modify Hello.pro This project file, add a line of code as follows:
QT + = GUI declarative
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/86/wKiom1TV0XOxMFCeAAHcOce7R6U729.jpg "title=" CMD Terminal compilation QT5 failed resolution 2.JPG "alt=" Wkiom1tv0xoxmfceaahcoce7r6u729.jpg "/>
Once saved, take the last step:mingw32-make.exe
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/86/wKiom1TV0YehTegFAAP52Bk9qck446.jpg "title=" CMD Terminal compilation QT5 failed resolution 3.JPG "alt=" Wkiom1tv0yehtegfaap52bk9qck446.jpg "/>
This allows you to compile a release version of the Hello.exe in the release directory , note, not the Debug directory Oh.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/83/wKioL1TV0oTzARkzAAF0sGlXgzY696.jpg "title=" CMD Terminal compilation QT5 failed resolution 4.JPG "alt=" Wkiol1tv0otzarkzaaf0sglxgzy696.jpg "/>
This article is from the "Galaxy Lin" blog, please be sure to keep this source http://kpjack.blog.51cto.com/627289/1612680
QT Classic error message qapplication:no such file or directory