Qt------------addStretch-------------的作用.
来源:互联网 发布:英文网站源码 编辑:程序博客网 时间:2024/05/27 00:42
Qt中addStretch的有趣应用
转自:http://blog.klniu.com/post/qt-interesting-applications-in-addstretch/
2条评论
今天在使用addStretch,布局的时候,发现addStretch竟然是可以平均分配的,有意思。比如:
QVBoxLayout *buttonLayout = new QVBoxLayout;buttonLayout->addStretch(1);buttonLayout->addWidget(Button1);buttonLayout->addStretch(1);buttonLayout->addWidget(Button2);buttonLayout->addStretch(1);buttonLayout->addWidget(Button3);buttonLayout->addStretch(6);
您会发现,buttonLayout的布局将空白没有widget的地方分成了9份,然后按照您所规定的地方分配弹簧,于是布局起来就方便多了,以前没有发现这个,一直还为布局头疼呢,现在有点门路了。
0 0
- Qt------------addStretch-------------的作用.
- Qt中addStretch的作用
- Qt中的addStretch函数的作用
- addStretch的作用
- addStretch的作用 .
- addStretch的作用
- addStretch的作用 .
- addStretch的作用
- addStretch的作用 .
- Qt addStretch()
- Qt中addStretch的有趣应用
- Qt中addStretch的有趣应用
- QT中布局器的addStretch函数使用效果1
- addStretch在布局中的作用
- QT 布局时使用 addStretch 可伸缩设置
- shard.qt的作用
- Qt::WA_StaticContents的作用
- [Qt] file:///的作用
- J2EE——JNDI
- 利用gtk函数 linux桌面截图 保存成图片
- NDK构建osgEarth到Android上——成功案例
- 杭电2571
- 认识shell
- Qt------------addStretch-------------的作用.
- UIColor,CGColor,CIColor三者的区别和联系
- 动态输入日期与时间
- linux下配置QT QMAKESPEC has not been set, so configuration cannot be deduced
- Square
- 黑马程序员_C语言结构体
- protel99se 元器件分为多个部分
- 云计算和虚拟化
- linux线程同步之互斥锁