#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());
}
}

  

QRadioButton的更多相关文章

  1. Qt Style Sheet实践(三):QCheckBox和QRadioButton

    导读 单选按钮(QRadioButton)和复选框(QCheckBox)是界面设计中的重要元素.单选按钮只允许用户在一组选项中选择一个,且当其中一个被选中的时候,按钮组中的其他单选按钮自动取消.复选框 ...

  2. QRadioButton分组且无边框的简单实现

    最近在用QT+VS2008做一个项目,涉及到一个综合测评表,说白了有点像问卷调查——很多题目每题若干个选项. 初始时打算用下拉框,每个框中填入所有选项,但后来一琢磨这种方式不够直观与人性化,增添了一步 ...

  3. QRadioButton 使用方法

    QRadioButton 控件是Qt中实现多选一功能的控件,它的使用方法如下: 声明控件: QRadioButton *rbutton; 然后实现它的响应函数: void YourClass::on_ ...

  4. Qt之QRadioButton

    简述 QRadioButton部件提供了一个带有文本标签的单选框(单选按钮). QRadioButton是一个可以切换选中(checked)或未选中(unchecked)状态的选项按钮.单选框通常呈现 ...

  5. QRadioButton类中Toggled()信号的使用方法

    QRadioButton类中Toggled()信号的使用方法 1.说明 QRadioButton中,Toggled()信号是在Radio Button状态(开.关)切换时发出的,而clicked()信 ...

  6. 2.QLabel,QPushButton,QLineEdit,QComboBox,QCheckBox,QRadioButton,QTextEdit,QTextBrowser,QGroupBox,QSl

     1.新建一个空项目(其它项目->空QT项目): 2  添加新文件(选择C++Class) MyWidget.h #ifndef MYWIDGET_H #define MYWIDGET_H ...

  7. GUI学习之七——单选框QRadioButton和QButtonGroup的学习总结

    一.单选框QRadioButton的使用 1.类的描述 a.单选框按钮用于给用户提供若干选项中的单选操作,当一个被选中时,会自动取消选中的那个.(如果只有一个时可以通过单击该按钮改变其状态:而存在多个 ...

  8. 八、pyqt5按钮类控件——QPushButton、QRadioButton、QCheckBox

    pyqt5中常用的按钮类控件有QPushButton.QRadioButton.QCheckBox.QToolButton等.这些按钮类的基类都是QAbstracButton类.所以这些类有部分方法是 ...

  9. 单选按钮QRadioButton

    继承  QAbstractButton import sys from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import QApplicat ...

  10. Qt5学习笔记——QRadioButton与QbuttonGroup

    [我是小标题:使用QToolButton实现radio button功能.] QRadioButton是什么?  下图是Windows系统中典型的radio button显示效果.    QRadio ...

随机推荐

  1. DelPhi学习网站

    http://www.2ccc.com/downloads.asp?subcatalogid=101&pageid=14 http://www.2ccc.com/ http://www.xue ...

  2. Gradle dsl method not found renderscriptSupportMode()

    连接: How to use the Renderscript Support Library with Gradle Android-Studio and Renderscript support ...

  3. Html5的DeviceOrientation特性

    设备定位API 引用W3C中的设备定位API的规范描述可知,该API“……定义了多种新型DOM事件,旨在提供与主机设备相关的物理朝向与运动状态信息.”由API提供的数据产生自多种来源,其中包括设备上的 ...

  4. CentOS 安装Gitolite 服务器

    [jackluo@localhost .ssh]$ sudo groupadd git #创建 用户组 [jackluo@localhost .ssh]$ sudo adduser --system ...

  5. Mysql 解决left join 数据重复的问题

    select p.*,g.roleName,pg.srcType from t_gold_pay_add p left join gRole g on p.roleID=g.roleID left j ...

  6. shell 之for [转]

    本文也即<Learning the bash Shell>3rd Edition的第五章Flow Control之读书笔记之二,但我们将不限于此.flow control是任何编程语言中很 ...

  7. CKEditor实现图片上传

    本人用的CKEditor版本为4.3 CKEditor配置和部署参考CKEditor4.x部署和配置. CKEditor编辑器的工具栏中初始的时候应该是这样子的,没有图片上传按钮 并且预览中有一堆火星 ...

  8. ASP.NET MVC系列 框架搭建(三)之服务层的搭建

    邯郸学步 吾虽是一不知名的菜鸟,但,吾亦有一个从后台程序员成为一名小小架构师梦想,深知架构师不是想想就成的. 吾已工作过一阵子,吾妄想在真正毕业之后工作一年左右就能拿到那个数ten thousand的 ...

  9. PHP+jQuery 注册模块的改进之三:使用 Smarty3

    Smarty3.1X( 最新版本 3.1.19) 比起Smarty2.x修改了不少特性.我把这个模块使用Smarty3.1.18 ( 下载地址http://www.smarty.net/files/S ...

  10. 返回指定的VC

    for (UIViewController *controller in self.navigationController.viewControllers) {            if ([co ...