#include “mainwindow.h”
#include “ui_mainwindow.h”
#include
#include
#include
#include
using namespace std;
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
QCheckBox *qccb=new QCheckBox(this);
qccb->setGeometry(0,0,100,20);
qccb->setText("yangkang");
QCheckBox *qccb1=new QCheckBox(this);
qccb->setGeometry(0,30,100,20);
qccb1->setText("yangkang1");
QButtonGroup* pButtonGroup = new QButtonGroup(this);
pButtonGroup->addButton(qccb,1);
pButtonGroup->addButton(qccb1, 2);
qDebug()<<qccb1->checkState();
}
MainWindow::~MainWindow()
{
delete ui;
}