Qt中addStretch的作用
来源:互联网 发布:公司上市 知乎 编辑:程序博客网 时间:2024/05/15 03:39
今天在使用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份,然后按照您所规定的地方分配弹簧,于是布局起来就方便多了,以前没有发现这个,一直还为布局头疼呢,现在有点门路了。
- Qt中addStretch的作用
- Qt------------addStretch-------------的作用.
- Qt中的addStretch函数的作用
- Qt中addStretch的有趣应用
- Qt中addStretch的有趣应用
- addStretch的作用
- addStretch的作用 .
- addStretch的作用
- addStretch的作用 .
- addStretch的作用
- addStretch的作用 .
- QT中布局器的addStretch函数使用效果1
- Qt addStretch()
- addStretch在布局中的作用
- qt中moc_的作用
- qt中moc的作用
- qt中moc的作用
- qt中moc的作用
- 111111111111111
- Ubuntu repository
- UML学习笔记之二(关系)
- An internal error occurred during: "Fetching children of Database".
- 多重继承及虚继承中对象内存的分布
- Qt中addStretch的作用
- JS创建替换删除节点
- C++中流控制函数 setw() setfill() setbase() setprecision()
- 贯穿应用开发始终的八大性能陷阱
- iOS静态库的编译
- cx_Oracle安装出现的一个问题以及解决办法
- vc如何刷新插入控件的数据
- java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind
- arcgis中连接excel时出错