Qt QHBoxLayout percentage size

前端 未结 4 2032
盖世英雄少女心
盖世英雄少女心 2020-12-29 21:58

How can I maintain an aspect ratio between two QHBoxLayouts?

For instance I want a QHBoxLayout to be one third of the entire window width and the other to be two thi

4条回答
  •  天命终不由人
    2020-12-29 22:49

    You can edit the sizePolicy for the widgets and set a higher horizontalStretch for the widget in the right.

提交回复
热议问题