Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt designer dialog box layout: widget reposition?
Qt 6.11 is out! See what's new in the release blog

Qt designer dialog box layout: widget reposition?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    delt
    wrote on last edited by SGaist
    #1

    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!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      HI
      You will use layouts.
      Then it will all resize.
      http://doc.qt.io/qt-5.5/designer-layouts.html

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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        delt
        wrote on last edited by
        #3

        Ah, thank you! I had done everything correctly but forgto to add a top-level layout.

        mrjjM 1 Reply Last reply
        0
        • D delt

          Ah, thank you! I had done everything correctly but forgto to add a top-level layout.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved