Use of QT layout manager (1)

Source: Internet
Author: User

Tag: QT

I was not clear about the layout manager of QT in the past. I learned it specially today and I think it is quite rewarding. I would like to share it with you.

First, we need to understand the usefulness of the layout manager and make our interface look neat and beautiful. The other point is to make our controls change with the size of the window, when the window is large, it becomes larger, and when the window is small, it becomes smaller.

Generally, well-written software must be maximized and minimized. Many times, when we maximize the size of the control, we find that the control is still the original one. It is difficult to see it. Now we don't have to worry about it. First, we should use manual layout to implement it, this is simple and intuitive.

First, paste a piece of information that I just deployed.


It's still neat. This is its initial size. After it is maximized, the proportional relationship between various controls remains unchanged.

Next we will talk about the layout idea:

1. Divide the interface into several parts. Like mine, it can be divided into three fast ones. First, the corresponding layout (horizontal or vertical) for each small part );

2. Complete the layout after deployment. I have read a lot of what I said on the Internet, and finally right-click in the blank space-layout in the layout of the form, the results do not achieve what I want, after trying for many times, I finally gave up.

My approach is to right-click and execute Layout-grid layout, and everything will be 0 K. Haha. Perfect. No matter how your form changes, it will change. Take a place and adjust the control policy.

Code layout is still a little difficult for beginners, but everyone will be willing to use code layout because it is not easy to make mistakes ......

Use of QT layout manager (1)

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.