Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

QApplication: No such file or directory of Qt Classic error message

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

QApplication: No such file or directory of Qt Classic error message

This error message is usually the first example for a novice to open Qt programming when compiling Qt5's first application "Hello,World". All

It's easy to say.

# include

# include

Int main (int argc, char * argv [])

{

QApplication app (argc,argv)

QWidget * ww=new QWidget ()

Ww- > resize (300200)

Ww- > show ()

Return app.exec ()

}

A compilation result of the above error, which is called a depressed.

As a matter of fact, a novice can solve the problem on his own by paying attention to the hint. The method is also simple, that is, after performing the following two steps

Qmake-project

Qmake

Modify the hello.pro project file immediately and add a line of code as follows:

QT + = gui declarative or QT + = core gui widgets

After saving it, perform the last step: mingw32-make.exe

In this way, you can compile a distribution version of hello.exe in the release directory, note, not the debug directory.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report