diff --git a/bin/xyylMCWEACSystem.exe b/bin/xyylMCWEACSystem.exe index dc4b4da..cf4494e 100644 Binary files a/bin/xyylMCWEACSystem.exe and b/bin/xyylMCWEACSystem.exe differ diff --git a/xyylMCWEACSystem/medicalrecordwidget.cpp b/xyylMCWEACSystem/medicalrecordwidget.cpp index ec52b7c..ca9d8cf 100644 --- a/xyylMCWEACSystem/medicalrecordwidget.cpp +++ b/xyylMCWEACSystem/medicalrecordwidget.cpp @@ -6,6 +6,7 @@ #include #include #include "datamanager.h" +#include MedicalRecordWidget::MedicalRecordWidget(QWidget * parent ):QWidget(parent) { init(); @@ -80,10 +81,26 @@ void MedicalRecordWidget::init() m_labSex.setText(tr("性别"));; m_chMan.setText(tr("男"));; m_chWan.setText(tr("女"));; + + QButtonGroup *SexpButtonGroup = new QButtonGroup(this); + // 设置互斥 + SexpButtonGroup->setExclusive(true); + SexpButtonGroup->addButton(&m_chMan); + SexpButtonGroup->addButton(&m_chWan); + // bool ok = connect(pButtonGroup, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(onButtonClicked(QAbstractButton*))); + + //左右利 m_labLaterality.setText(tr(" 左右利")); m_chLeft.setText(tr("左"));; m_chRfight.setText(tr("右"));; + QButtonGroup *LabpButtonGroup = new QButtonGroup(this); + // 设置互斥 + LabpButtonGroup->setExclusive(true); + LabpButtonGroup->addButton(&m_chLeft); + LabpButtonGroup->addButton(&m_chRfight); + + //检查日期 m_labDate_Of_inspection.setText(tr("检查日期")); m_labAge.setText(tr("年龄")); diff --git a/xyylMCWEACSystem/medicalrecordwidget.h b/xyylMCWEACSystem/medicalrecordwidget.h index 695e9c6..f69589d 100644 --- a/xyylMCWEACSystem/medicalrecordwidget.h +++ b/xyylMCWEACSystem/medicalrecordwidget.h @@ -15,6 +15,7 @@ #include #include #include +#include class MedicalRecordWidget:public QWidget { Q_OBJECT @@ -40,24 +41,24 @@ private: //住院 hospitalized QLabel m_labType; - QCheckBox m_chHospitalized; - QCheckBox m_chOutpatient; + QRadioButton m_chHospitalized; + QRadioButton m_chOutpatient; //姓名 QLabel m_labName; QLineEdit m_editName; //性别 QLabel m_labSex; - QCheckBox m_chMan; - QCheckBox m_chWan; + QRadioButton m_chMan; + QRadioButton m_chWan; //年龄 QLabel m_labAge; QLineEdit m_editAge; //左右利 QLabel m_labLaterality; - QCheckBox m_chLeft; - QCheckBox m_chRfight; + QRadioButton m_chLeft; + QRadioButton m_chRfight; //出生日期 QLabel m_labBirthDay; QDateEdit m_dateBirthDay;