• 3514阅读
  • 2回复

布局 [复制链接]

上一主题 下一主题
离线sf_lou
 

只看楼主 倒序阅读 楼主  发表于: 2011-08-09
我知道QT的布局管理器挺好用的,可是它总是太执拗了,我想要一种2/3 ,1/3的布局,有谁知道吗?
离线ppdayz

只看该作者 1楼 发表于: 2011-08-09
回 楼主(sf_lou) 的帖子
void QGridLayout::setRowStretch ( int row, int stretch )
Sets the stretch factor of row row to stretch. The first row is number 0.
The stretch factor is relative to the other rows in this grid. Rows with a higher stretch factor take more of the available space.
The default stretch factor is 0. If the stretch factor is 0 and no other row in this table can grow at all, the row may still grow.

void QGridLayout::setColumnStretch ( int column, int stretch )
Sets the stretch factor of column column to stretch. The first column is number 0.
The stretch factor is relative to the other columns in this grid. Columns with a higher stretch factor take more of the available space.
The default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow.

同时可以配合设置空间到最大最小高度宽度来
离线sf_lou

只看该作者 2楼 发表于: 2011-08-09
兄弟 咋个都是英文啊?我用了gridlayout 啼笑皆非的是,左边是1/3,2/3在右边 我要暴走了
快速回复
限100 字节
 
上一个 下一个