Qt - How to control the widget sizes in QLayout

后端 未结 4 916
名媛妹妹
名媛妹妹 2021-01-15 08:12

I am trying to put some spinboxes,line edits in a layout. But the size extends more than the neccesity. Below is the figure

4条回答
  •  别那么骄傲
    2021-01-15 08:51

    It's easy. It can be done by giving the stretching factor. That means you have to initiate the value when you use the functions

    addWidget(widget,stretchfactor);
           or
    addLayout(layout,stretchfactor);
    

提交回复
热议问题