⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addstudentform.ui.h

📁 学生管理系统 使用Qt写的界面 交互性好
💻 H
字号:
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/


void Form2::Add()
{
    bool ok;
    name = lineEdit1->text();
    if(name == "")return;
    ID = lineEdit2->text();
    if(ID == "")return;
    agetext = lineEdit3->text();
    age = lineEdit3->text().toInt(&ok,10);
    if(ok == false || age < 0 || age > 200)return;
    switch(comboBox1->currentItem()){
    case 0:
	sex = 'M';sextext = "Male";break;
    case 1:
	sex = 'F';sextext = "Female";break;
    }
    close();
}


void Form2::myinit()
{
    name = "";
    ID = "";
    age = 0;
    sex = 'M';
    agetext = "";
    sextext = "";
    lineEdit1->setText("");
    lineEdit2->setText("");
    lineEdit3->setText("");
    comboBox1->setCurrentItem(0);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -