Qt creator the first program QT learning notes chapter 3

Source: Internet
Author: User

Okay. Now we are working.

Open the QT creator tool and select "file" and "new file or project"

 

There are multiple types of projects and files. Here we are mobile development.

Select "mobile application" on the right of "QT Control Project"

Click "select" and the configuration will pop up, for example:

Enter the project name and file path, and click Next to select a device:

There is an introduction before, and I will not talk about it here. Next, next:

The icon here is in SVG format. If you have one, change it. The following target uid3: This is the ID of the program. In the mobile phone, the corresponding file will be created, for example: e2433b13.

There are no questions here. Well, next step.

Select the icon and click Next.

In this way, the project is established.

 

There is a UI, and I am working on C #. This vs has similar effects and is visualized. When a newbie comes in, this UI is still quite good. However, this interface is not very good in the mobile phone. Let's look at the examples. Basically, the interface is displayed in the code area, here we will first use this interface, which looks ugly.

Now, start a hello World:

 

Drag a label from the control on the left and double-click the control to edit the displayed text. Then, change the font size in the attribute on the right. The final result is as above.

Then, press Ctrl + 2 to switch to "edit", set the current project as the startup item, and click "run" in the lower left corner to see the effect. Now we use a virtual machine.

The result is displayed. For more information, see the description in the figure. In this figure, we can see that the text displayed on the mobile phone screen is incomplete. This is because of the pixel size of the interface. Well, let's change it.

Pull lable a little wider.

OK, hello World is out.

This chapter is here first. Others, you can try it yourself.

 

 

 

 

 

 

 

 

 

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.