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

最新文章

  1. web.config连接字符串的一些总结
  2. 从MyEclipse转战到IntelliJ IDEA的经历
  3. Java设计模式(七) 模板模式
  4. .net 文件下载【转】
  5. 5.3.1 新建Java工程和类
  6. Flex基础相关
  7. Java线程同步之一--AQS
  8. mybatis入门-新手注意问题
  9. jq获取浏览器的高度
  10. IBM的websphere MQ的c#使用
  11. vue安装使用
  12. 【详解JavaScript系列】JavaScript之变量
  13. JavaWeb在线电子相册springmvc
  14. SQL查询有两门以上不及格的学生及查询出全部及格的学生
  15. VisualSVN 破解方法
  16. (二)windows上使用docker
  17. Mysql update case
  18. <input type=file>上传唯一控件
  19. encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的区别
  20. 第五篇 Postman离线安装interceptor插件---Chrome app及录制请求

热门文章

  1. 操作SharedPreferences的注意点
  2. JNI之本地线程进入c层
  3. 有向图的欧拉路径POJ2337
  4. Android的GridView和Gallery结合Demo
  5. The following module was built either with optimizations enabled or witherout debug information
  6. "javascript:void(0)"用法
  7. (一)SAPI简述
  8. 【转】 NSArray copy 问题
  9. IOS开发常用的linux命令
  10. C#设置IP地址,启用禁用适配器