简体   繁体   English

QSplitter中的固定宽度小部件

[英]Fixed width widget in QSplitter

I have 3 QWidget s placed into one horizontal QSplitter . 我将3个QWidget放入一个水平QSplitter So there is left, central and right QWidget . 因此有左,中和右QWidget And I have 2 grappling point (is this how is it called?): between left/central and central/right QWidget s. 我有两个抓点(这是怎么称呼的?):在左/中央和中央/右QWidget

What I want is to have central widget of fixed width, so when I move oned grappling point left/right, the other one should move exactly the same way. 我想要的是具有固定宽度的中央小部件,所以当我左右移动抓点时,另一个应该完全相同地移动。

I've tried setting horizontal policy of QSizePolicy of central widget to Fixed and Minimum . 我尝试将中央窗口小部件QSizePolicy的水平策略QSizePolicyFixedMinimum Also I've tried horizontal stretch for left and right widgets to 1, but none of these helped. 我也尝试过将左右窗口小部件的水平拉伸到1,但是这些都没有帮助。

QWidget::setFixedWidth applied to the widget you would like to have a fixed width. QWidget :: setFixedWidth应用于您希望具有固定宽度的小部件。 That one of course wants you to specify that width. 那当然是要您指定该宽度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM