Any way to make plainTextEdit or other widget size automatically to fill the parent window when I resize that window in runtime?
Any way to make plainTextEdit or other widget size automatically to fill the parent window when I resize that window in runtime?
implement sizeHint() of the widget and provide it with the size of the parent..thus, everytime a resize occurs, it will take the size of the parent...hope that works
Confused, did you use QLayout?
Hi,
In order to do autofill or "auto resize", you need to give a layout for the parent widget. This is the only way as far as I know.
Regards.
Hi,
First, try to resize from the bottom side of the mainWindow, you see it's resizing. Secondly, put a frame or widget inside your mainWindow and put your child widgets( i.e. plainTextEdit) to this frame. Then play with the frame size. You see resizing works fine.
I got it (thanks to this post)
All I had to do is put my plainTextEdit on main window, right click on empty space (on main window) and select one of the layouts.
Äh, you use the designer... For further problems using designer please use Qt Designer Forum.
Bookmarks