• 4526阅读
  • 2回复

[提问]关于布局的问题、求助 [复制链接]

上一主题 下一主题
离线silence.sx
 
只看楼主 倒序阅读 楼主  发表于: 2012-07-20
创建了一个

QHBoxLayout      给他里面添加QLabel  要么从左到右、要么从右到左。




我能不能让他从中间开始排列。

离线alexltr

只看该作者 1楼 发表于: 2012-07-20
有沒有試過, 不知道可不可以?


bool QLayout::setAlignment ( QWidget * w, Qt::Alignment alignment )


Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

void QLayout::setAlignment ( Qt::Alignment alignment )


Sets the alignment of this item to alignment.
See also QLayoutItem::setAlignment().

bool QLayout::setAlignment ( QLayout * l, Qt::Alignment alignment )


This is an overloaded function.
Sets the alignment for the layout l to alignment and returns true if l is found in this layout (not including child layouts); otherwise returns false.
我不从事IT,只是喜欢Qt。
我不是程序员,只是与程序有缘。
我写程序,只是为了让工作变得简单有序!

                      ----  一个一直在入门的编程学习者
离线silence.sx
只看该作者 2楼 发表于: 2012-07-23
回 1楼(alexltr) 的帖子
貌似没有反映.0.0.0.
快速回复
限100 字节
 
上一个 下一个