Layout Vertically cause to resize the QListWidgets. (Smaller one become larger one)
-
Hi,
I'm using Qt Creator 2.4.1 Designer mode. I followup following steps.- Create two groupboxes 'AGroupbox' and 'BGroupbox'
- Inside 'AGroupbox ' create 'ACheckBox' and 'AListWidget'
- Inside 'BGroupbox' create 'BListWidget'
- Apply Vertical Layout to both groupboxes.
- 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.
-
Post your image at some free image hostings and then you can add "picture" to post.
-
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.
-
Check "sizePolicy" for GroupBox and ListWidgets. But if you need hardcoded sizes, you can set Max and Min sizes for widgets.
-