Solved Qt designer dialog box layout: widget reposition?
-
Hello everyone, (sorry this is my second attempt posting this, the first got polluted by spammers)
I'm wondering if there's a function/method i can call to make widgets reposition themselves in a QDialog, when the dialog is resized. Right now, the whole layout is static, and (at least by default) even lets the user resize the dialog window to (0, 0).
This causes problems with translation to other languages, where strings don't have the same length when translated, as they do when the dialog is created.
...any advice on this, thanks in advance!
-
HI
You will use layouts.
Then it will all resize.
http://doc.qt.io/qt-5.5/designer-layouts.htmltry out here
http://doc.qt.io/qt-5/qtwidgets-layouts-basiclayouts-example.html
You find this example in the example tab In Creator. just search for layout. -
Ah, thank you! I had done everything correctly but forgto to add a top-level layout.
-
@delt
Oh. great.
You didn't mention you already tried layouts so I assumed you didn't see them yet.
Also the minimum and maximum size property of a widget is used with layouts to controls sizes.