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!

  • Qt Champions 2017

    You will use layouts.
    Then it will all resize.

    try out here
    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.

  • Qt Champions 2017

    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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.