Weird layout behaviour
-
Hi,
I struggled through some layout behaviour, where I did not find a solution for.
Here's a stripped down project to show the issue.
PositionStatus is the class of interest. It's a gridlayout with some rows and columns. The second column has 2 widgets per cell, which are toggled by action.
I started with simple QLabel elements. Then I tried to extend QLabel so that the hidden label is resized when the visible label is resized.I run out of ideas, how to stop that unwanted layout resizing.
To see the issue, compile it and run it.
- resize the main window to the minimal possible size.
- use the action from main-menu to toggle between relative and absolute (its a checkable action).
On first toggle the main window increases size. Don't know where it comes from - as now it is ensured, that both labels of each cell have same size.
Even if the first size change still seems comprehensible, the second is completely absurd.