Hi,
I want something that seems fairly simple but I can’t manage to find how to do it.
I need to have widgets A and B in a vertical splitter, with the following constraints:
A has a variable height but constrained between 30px and 150px
B is expanding in all directions without limit
I want A to have its minimal (30px) size when the application starts. The user is then free to change it using the splitter.
I have set A’s verticalpolicy to Minimum, and B’s vertical policy to Expanding.
I have set A’s minimum height to 30 and maximum height to 150px. (If it matters, I’m doing this through the GUI in QtCreator).
I have not set any size constraints on B.
What happens is that A always reaches its maximum (150px) size on application startup.
Here is how it looks like (A is the QTextEdit at the top, B is the QTableView at the bottom):
The maximum and minimum allowed sizes of A are well enforced, but I can’t figure out how to make A start with its minimum height and not the maximum.
Any idea?
Thanks in advance!
↧