简体   繁体   中英

Help in designing layout with qtdesigner for python

I am working on Qtdesigner for generating a GUI for my python app.

The problem is that I had manually made the widgets and then compiled it to py. But then I found out that the components did not resize when maximised.

So I opened the .ui file in designer and selected the group box for my widgets and chose layout in grid by right clicking on it.

Even now the widgets do not resize on maximising....

Do I have to do something else ???

Thanks a lot...

To have the widgets resized with the window, you must apply a layout to your top-level object (usually QMainWindow ), and then place your new widgets where you want in the layout (and maybe other layouts for a more complicated window).

NOTE: the menu items allowing to apply a layout on the main window will be available only once you have placed your first widget in it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM