QT学习-10/20/2012

1.QLabel的背景色

label->setAutoFillBackground (true);
QPalette palette;
palette.setColor(QPalette::Active, static_cast<QPalette::ColorRole>(10), QColor(255,0,0));
label->setPalette(palette);

http://www.qtcn.org/bbs/read-htm-tid-5591-page-2.html

2.QGroupBox:http://blog.csdn.net/dizuo/article/details/6011819

3.QRadioButton:

判断QButtonGroup中哪个QRadioButton被选中:http://qimo601.iteye.com/blog/1435285

方法1:可以通过对象名称去判断

方法2:通过checkedId去判断

basic用法:http://blog.sina.com.cn/s/blog_5c70dfc80100ra5m.html

使用setchecked来设置他们的状态。

 

posted on 2012-10-20 16:55  fire_fuxm_USTC  阅读(143)  评论(0编辑  收藏  举报