Autosize children of a QFrame
-
wrote on 18 Sept 2017, 09:17 last edited by
Hi
I have a QFrame that contains some QLabel's.
The width of the frame is set variable based on the content of one of the labels - this works as expected.
The complete frame is animated instead of only shown and hidden, respecting the variable width - works as expected too.Is there a way to automatically extend the width of all child labels of the frame to the same, i.e. the current size the frame gets?
I know I can set this with some lines of codes manually. However, if there is a functionality in Qt that can di this that would be the nicer solution.Thanks
McL -
Hi
I have a QFrame that contains some QLabel's.
The width of the frame is set variable based on the content of one of the labels - this works as expected.
The complete frame is animated instead of only shown and hidden, respecting the variable width - works as expected too.Is there a way to automatically extend the width of all child labels of the frame to the same, i.e. the current size the frame gets?
I know I can set this with some lines of codes manually. However, if there is a functionality in Qt that can di this that would be the nicer solution.Thanks
McL@McLion You can use layouts for those labels
2/2