QT Classic error message qapplication:no such file or directory

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.