Some time ago, when we started to learn QT, I tried to layout a serial communication form.
After the layout, also tried on different computers (laptops and working desktops), there is no problem: the layout is normal. But inadvertently, when you open this project on Surface 3, you find that the layout appears confusing. The following post describes:QT 5.3.1 dragged out of the UI layout, why on different computers show the difference so big?
As suggested by friends in this post, layout controls are laid out. Because there is no prior to the layout, the process also encountered a lot of problems. But at the end of the layout it is a result of achieving the desired effect as shown in the following:
Let's talk about the problems in the Layout process:
1) When Vertical Space is not placed, several vertival Layout on the left will change position with the size of the form. Finally abandoned this layout, the important layout.
2) After re-layout, the location of several Vertical layouts on the left no longer varies with the size of the form, but the size of the Edit on the right does not change depending on the size of the form. This is not the effect I want!
3) on the basis of the 2 layout, it is found that you want the Edit control on the right to change with the size of the form, you need to press the right mouse button on the form, then select: Layout, horizontal layout (or other layout). In this way, controls and Layout placed on the form will change "certain" depending on the size of the form.
4) Place Vertical space to make it occupy "superfluous" blanks.
The importance of QT layout