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)