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 and layout problems
Qt 6.11 is out! See what's new in the release blog

Qt and layout problems

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 2.4k 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.
  • T Offline
    T Offline
    tucnak
    wrote on last edited by
    #1

    I can't layout items in layout.
    "LINK (screenshot)":http://xmages.net/i/3283070

    I want my tablewidget fit when window size is changing, so I created layout. When I am changing window size, my layout not changing size.

    Maybe I am not using it correctly.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You have to make sure that:

      Every layout has been set on a QWidget (using QWidget::setLayout) or another layout

      Every widget is in a layout

      That needs to be true all the way up to the top level widget.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chris H
        wrote on last edited by
        #3

        In particular, make sure you have set the central widget of your main window (if you are using a QMainWindow) or set the layout for your dialog, if using QDialog. Are you using Designer to lay out the widgets, or doing it by hand?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tucnak
          wrote on last edited by
          #4

          Yes, I've done all that. Layout have to fit sizes of all widgets in him when window size is changing. But in my case, it doesn't working.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tucnak
            wrote on last edited by
            #5

            "LINK (screenshot)":http://xmages.net/i/3283070

            There is screenshot of my Designer.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              "It doesn't work" is not enough to diagnose your problem. However, not that many, many people are using Qt's layouts with great success. So, it is more likely that you are missing a step, than that Qt doesn't work correctly.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                There is no layout for the top level dialog, I think.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  broadpeak
                  wrote on last edited by
                  #8

                  [quote author="Andre" date="1325084252"]There is no layout for the top level dialog, I think. [/quote]

                  I see the same!

                  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