• 5567阅读
  • 1回复

关于QRationButton的问题 [复制链接]

上一主题 下一主题
离线youhaodeyi
 

只看楼主 倒序阅读 楼主  发表于: 2006-04-21
请问:1、如何关联两个RationButton对象,让他们只能选中其中的一个,从而实现单选。
    2、怎么能让某个RationButton默认选中?
谢谢
离线jollygrass

只看该作者 1楼 发表于: 2006-04-21
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 );
快速回复
限100 字节
 
上一个 下一个