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

How does QT implement Hello World! program

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

Share

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

This article is about how QT implements Hello World! The content of the program. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Download and install QT

Download address of QT: https://www1.qt.io/cn/

The latest version should be 5.10. I downloaded 5.9.4. You can download and install Baidu. I won't go into details.

QTCreator

New project

After we open QTCreator, click File-- New File and Project

Select a console application

Change its name to HelloWorld

Go on to the next step, and the next step will be done.

This generates our project.

Add # include to it

And then add it to the code

Then click the green triangle symbol in the lower left corner, which will prompt you to save it and run it directly.

Then our interface console program prints out Hello Worldlings!

And can # include

To implement it in cout way, this is to consolidate the C++ method that I learned two days ago.

Then we add a variable std::string name to the code

Input with std::cin

Then use std::cout to output

Let's rerun the program:

At this time, a new line is displayed after printing Hello World in the console. Please enter your name:

We enter Vaccae

Click enter again to print out the Hello World Vaccae

The first Hello World is complete!

Thank you for reading! This is the end of this article on "how to achieve Hello World in QT!". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

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