QRadioButton

QRadioButton

#include "dialog.h"
#include "ui_dialog.h"
#include <QtCore>
#include <QtGui>
#include <QMessageBox> Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this); } Dialog::~Dialog()
{
delete ui;
} void Dialog::on_pushButton_clicked()
{
//ui->lineEdit->setText("Hello cat");
//QMessageBox::information(this,"Title",ui->lineEdit->text());
if(ui->radioButton->isChecked())
{
QMessageBox::information(this,"Title",ui->radioButton->text());
}
if(ui->radioButton_2->isChecked())
{
QMessageBox::information(this,"Title",ui->radioButton_2->text());
}
}

  

上一篇:Web Application Project is configured to use IIS. Unable to access the IIS metabase.(配置为使用IIS Web应用程序xxxx项目。无法访问IIS元数据库。)


下一篇:poj2891 拓展欧几里得