QT Learning Path - First program HelloWorld!


After learning OpenCV a while ago, I feel that if I do image processing, it is much faster than C++ in terms of efficiency and speed, and then I researched QT, which is also cross-platform, so I am ready to start QT, because I need a foundation in C++ to learn QT, and the last two weeks have been badly supplementing C++, which is a little gain, so today I started learning QT, which is also a consolidation of the recently learned C++.

QT download and installation

QT's download address https://www1.qt.io/cn/

The latest version should be 5.10, I downloaded is 5.9.4, download and install can be Baidu, I will not go into details here


New construction projects

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

Select a control desk application

Change the name to HelloWorld

Then next, next until you're done.

This generates our project.

Add #include to the top

Then add to the code

Then click on the green triangle symbol in the bottom left corner, you will be prompted to save and run it directly

Then our interface console program prints out Hello World!!!

There is also the possibility to #include

This is done in cout, to consolidate the C++ methods learned two days ago

Then we add a variable std::string name inside the code;

Input with std::cin

Then output with std::cout

Let's rerun the program:

At this point a new line is displayed in the console after Hello World is printed Please enter your name:

We type in Vaccae

Hit enter again and it will print out Hello World Vaccae

The first Hello World is complete!!!


Long press the two-dimensional code below to follow

1、AI has arrived HR cloud services open a new era
2、Artificial Intelligence Intelligent Vision Models I
3、Solve the impossible Trinity The Perpetual Trust Advantage of IPFS
4、You wont feel alone when you can open up to a robot
5、Big data hits a wall in the energy sector Swire Gods Technology and look at the attempt they made

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送