首页| 论坛| 消息

标题:关于QRationButton的问题
作者:youhaodeyi
日期:2006-04-21 10:12
内容:

请问:1、如何关联两个RationButton对象,让他们只能选中其中的一个,从而实现单选。
2、怎么能让某个RationButton默认选中?
谢谢


#1 [jollygrass 04-21 11:28]
ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
ButtonGroup1->setGeometry( QRect( 10, 0, 171, 110 ) );
RadioButton3 = new QRadioButton( ButtonGroup1, "RadioButton3" );
RadioButton3->setGeometry( QRect( 30, 70, 95, 20 ) );
RadioButton1 = new QRadioButton( ButtonGroup1, "RadioButton1" );
RadioButton1->setGeometry( QRect( 30, 30, 95, 20 ) );
RadioButton2 = new QRadioButton( ButtonGroup1, "RadioButton2" );
RadioButton2->setGeometry( QRect( 30, 50, 95, 20 ) );
RadioButton2->setChecked( TRUE );

回复 发表
主题 版块