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. Layout Vertically cause to resize the QListWidgets. (Smaller one become larger one)

Layout Vertically cause to resize the QListWidgets. (Smaller one become larger one)

Scheduled Pinned Locked Moved General and Desktop
5 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.
  • H Offline
    H Offline
    Hareen Laks
    wrote on last edited by
    #1

    Hi,
    I'm using Qt Creator 2.4.1 Designer mode. I followup following steps.

    1. Create two groupboxes 'AGroupbox' and 'BGroupbox'
    2. Inside 'AGroupbox ' create 'ACheckBox' and 'AListWidget'
    3. Inside 'BGroupbox' create 'BListWidget'
    4. Apply Vertical Layout to both groupboxes.
    5. Apply Vertical layout for Qwidget

    'AListWidget' holds lesser amounts of data than 'BListWidget'. So I creates smaller list widget for 'AListWidget'. But above step 5 cause to increase the height of 'AListWidget'. And it becomes larger than 'BListWidget'.

    Now I have 'AListWidget' with empty space and at the same time not enough space at 'BListWidget'.

    Can anyone help me to understand what it is happening?

    Thanking you.

    -P.S. If I know how to add images here, I can show you easily.-

    I added images below.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      Post your image at some free image hostings and then you can add "picture" to post.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hareen Laks
        wrote on last edited by
        #3

        Before Add Vertical Layout

        !http://s21.postimg.org/y5itg4yev/Before_add_layout.png(Before Add layout)!

        After Add Vertical Layout

        !http://s22.postimg.org/d0rlt1jap/After_add_layout.png(After add Vertical Layout)!

        Thank you qxoz.

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

          Check "sizePolicy" for GroupBox and ListWidgets. But if you need hardcoded sizes, you can set Max and Min sizes for widgets.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hareen Laks
            wrote on last edited by
            #5

            @qxoz,

            Thanks for the reply.

            But I have felt some difficulty with understanding the 'size policy'.

            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