现在的位置: 首页 > 综合 > 正文

qt 布局

2014年01月08日 ⁄ 综合 ⁄ 共 757字 ⁄ 字号 评论关闭

  void QBoxLayout::addWidget ( QWidget * widget,
int 
stretch = 0, Qt::Alignment alignment =
0 )

Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment.

The stretch factor applies only in the direction of the QBoxLayout, and is relative to
the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more.

If the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to theQWidget:sizePolicy()
of each widget that's involved.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

  增加部件这个布局的底部,带着伸长因子和排列方式。扩张因子因用于这个布局的方向,并且与部件与布局有关,部件与和布局会增长的更快。

  假如扩张因子假如是0并且什么也没有这个布局中,这个空间是与QWidget:sizePolicy() 有关的。

   这个布局是特定的,默认是0,也就是填满了整个空间。

   

抱歉!评论已关闭.