Why does the QT designer resize or prevent me from squeezing or expanding widgets or buttons?

Often when using the QT designer, I need to resize things, reducing or expanding them. Whenever I try to do this, the program does not allow me and simply reverts to the original default size that it gives me when placing an object in my window, no matter what format I have. Why is he doing this? And is it possible to change this so that I can resize my own will without limits? I tried to learn how to use the QT constructor correctly, but I can not find much information about this on the Internet.

+4
source share
1 answer

Everything that is placed in the Layout will be automatically resized to fit the layout. This means that Qt can automatically resize if the user resizes the form at run time.

If you want absolute placement, the easiest way is to simply not use layouts, place things directly on MainForm. You can also place the โ€œcontainerโ€ (the โ€œGroupโ€ field, the โ€œWidgetโ€ tab) inside the layout and place the components in it; containers do not act like layouts. All of this is in the manual .

thuga, , , . .

+3

Source: https://habr.com/ru/post/1627666/


All Articles