JaV0
17th September 2012, 22:53
Hello,
The more I try to understand how QSizePolicy works, I fail. I have for example a QLabel and a QListWidget at QtDesigner. I put them into a QSplitter (horizontal) and I want the QLabel expands as much as posible and the QListWidgets don't shrinks more than 100 in its height. So I choose the vertical QSizePolicy of the QLabel to Expanding and the vertical QSizePolicy of the QListWidget to Minimum (and Maximum, and all combinations) and also fixing the Minimum size to 100. Well, the applications does what he wants and the QLabel shrinks the maximum and the QListWidgets grows as he wants. I also tried all the combinations between size policies and it still fails. Furthermore, I don't want to set the minimum size and the maximum size to the same fixed value because I want that user controls the size of the widgets. I only want that at the app starts, the QLabel uses all the possible space and the QListWidget shrinks at size 100.
Thanks in advance.
The more I try to understand how QSizePolicy works, I fail. I have for example a QLabel and a QListWidget at QtDesigner. I put them into a QSplitter (horizontal) and I want the QLabel expands as much as posible and the QListWidgets don't shrinks more than 100 in its height. So I choose the vertical QSizePolicy of the QLabel to Expanding and the vertical QSizePolicy of the QListWidget to Minimum (and Maximum, and all combinations) and also fixing the Minimum size to 100. Well, the applications does what he wants and the QLabel shrinks the maximum and the QListWidgets grows as he wants. I also tried all the combinations between size policies and it still fails. Furthermore, I don't want to set the minimum size and the maximum size to the same fixed value because I want that user controls the size of the widgets. I only want that at the app starts, the QLabel uses all the possible space and the QListWidget shrinks at size 100.
Thanks in advance.