QT 设置SizePolicy的例子(简单明了)
2024-10-18 22:36:02
http://hi.baidu.com/cybertingred/item/e8eadaad0c7f62f615329be7
QPushButton *left = new QPushButton("killin' kind");
QPushButton *right = new QPushButton("Emma");
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(left);
layout->addStretch();
layout->addWidget(right);
QSizePolicy policy = left->sizePolicy();
policy.setHorizontalStretch(1);
policy.setVerticalStretch(1);
policy.setHorizontalPolicy(QSizePolicy::Minimum);
left->setSizePolicy(policy);
policy = right->sizePolicy();
policy.setVerticalStretch(1);
policy.setHorizontalStretch(3);
policy.setHorizontalPolicy(QSizePolicy::Minimum);
right->setSizePolicy(policy);
http://blog.csdn.net/skykingf/article/details/8273992
最新文章
- web.config连接字符串的一些总结
- 从MyEclipse转战到IntelliJ IDEA的经历
- Java设计模式(七) 模板模式
- .net 文件下载【转】
- 5.3.1 新建Java工程和类
- Flex基础相关
- Java线程同步之一--AQS
- mybatis入门-新手注意问题
- jq获取浏览器的高度
- IBM的websphere MQ的c#使用
- vue安装使用
- 【详解JavaScript系列】JavaScript之变量
- JavaWeb在线电子相册springmvc
- SQL查询有两门以上不及格的学生及查询出全部及格的学生
- VisualSVN 破解方法
- (二)windows上使用docker
- Mysql update case
- <;input type=file>;上传唯一控件
- encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的区别
- 第五篇 Postman离线安装interceptor插件---Chrome app及录制请求
热门文章
- 操作SharedPreferences的注意点
- JNI之本地线程进入c层
- 有向图的欧拉路径POJ2337
- Android的GridView和Gallery结合Demo
- The following module was built either with optimizations enabled or witherout debug information
- ";javascript:void(0)";用法
- (一)SAPI简述
- 【转】 NSArray copy 问题
- IOS开发常用的linux命令
- C#设置IP地址,启用禁用适配器