Reputation:
I have a main window and I want that when I maximize it the widgets inside it should automatically be resized ....
Is there any way I can do that ????
Upvotes: 1
Views: 1192
Reputation: 273456
Yes. Use layout objects (such as QHBoxLayout
or QGridLayout
) to organize your widgets inside, and set the widgets' resize modes accordingly. Note that standard Qt-supplied widgets support resizing by default.
Upvotes: 2
Reputation: 530
If you want to save you a lot of work, don't hand-code the ui. Use Qt Creator to create a ui file and then load this file dynamically using PyQt4.uic module. There is also a "static" approach that generates python code from Qt Creator ui files.
Upvotes: 1