资源简介

QT版学生成绩管理系统(源码,未使用数据库) QT版本5.5.1下通过 另有可执行文件,若有需要,请另外下载(压缩包有网址)

资源截图

代码片段和文件信息

#include “dialog.h“
#include “ui_dialog.h“

Dialog::Dialog(QWidget *parent) :
    QDialog(parent)
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    this->setWindowtitle(“登录“);

    this->setWindowIcon(QIcon(“:/new/icons/image/book.jpg“));

    this->setMaximumSize(399252);
    this->setMinimumSize(399252);

    QPalette p;
    p.setColor(QPalette::WindowTextQt::red);
    ui->titleLabel->setPalette(p);

    QPalette q;
    q.setBrush(QPalette::BackgroundQBrush(QPixmap(“:/new/icons/image/loginbk1.jpg“).scaled(this->size())));
    this->setPalette(q);

    ui->loginButton->setIcon(QIcon(“:/new/icons/image/Enter.png“));
    ui->registerButton->setIcon(QIcon(“:/new/icons/image/log.png“));
    ui->exitButton->setIcon(QIcon(“:/new/icons/image/exit.png“));

    ui->pictureLabel->setPixmap(QPixmap(“:/new/icons/image/teemo.png“).scaled(ui->pictureLabel->size()));

    ui->loginButton->setEnabled(false);

    ui->userNameLineEdit->setPlaceholderText(“请输入用户名“);
    ui->passWordLineEdit->setPlaceholderText(“请输入密码“);

    ui->passWordLineEdit->setEchoMode(QLineEdit::Password);

    Qobject::connect(ui->userNameLineEditSIGNAL(textChanged(QString))thisSLOT(loginButtonToUse()));
    Qobject::connect(ui->passWordLineEditSIGNAL(textChanged(QString))thisSLOT(loginButtonToUse()));

    radiogroup=new QButtonGroup;
    radiogroup->addButton(ui->studentRadioButton0);
    radiogroup->addButton(ui->teacherRadioButton1);
}

Dialog::~Dialog()
{
    delete ui;
}
void Dialog::loginButtonToUse()
{
    ui->loginButton->setEnabled(true);
}
void Dialog::on_registerButton_clicked()
{
    RegisterDialog r(this);
    this->hide();
    if(r.exec()==QDialog::Accepted)
    {
        this->showNormal();
        this->clearAll();
    }
}
void Dialog::clearAll()
{
    ui->userNameLineEdit->clear();
    ui->passWordLineEdit->clear();
}
bool Dialog::judgeEmpty()
{
    if(ui->userNameLineEdit->text().isEmpty())
    {
        QMessageBox::warning(this“警告““用户名不能为空“);
        return false;
    }
    else if(ui->passWordLineEdit->text().isEmpty())
    {
        QMessageBox::warning(this“警告““密码不能为空“);
        return false;
    }
    else
        return true;
}
void Dialog::on_loginButton_clicked()
{
    if(!judgeEmpty())
    {
        //QMessageBox::warning(this“警告““请完整填写“);
        //clearAll();
        ui->passWordLineEdit->clear();
        return ;
    }
    if(radiogroup->checkedId()==0)
    {
        QString name;
        QString account;
        QString fileName=“Register_student.dat“;
        bool find=findRegisterUser(fileNamenameaccount);
        if(find)
        {           
            ui->userNameLineEdit->clear();
            ui->passWordLineEdit->clear();
            //QMessageBox::information(this“通知““恭喜您,登录成功“);
            student=new StudentManage;
            Qobject::connect(studentSIGNAL(toDialog())thisSLOT(showNormal()));
            student->s

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        262  2016-03-03 22:15  备注.txt

     文件       5306  2016-02-19 10:06  test1\dialog.cpp

     文件        906  2016-02-18 11:02  test1\dialog.h

     文件       3890  2016-02-19 10:08  test1\dialog.ui

     文件      67646  2016-02-19 10:23  test1\fast.ico

     文件        201  2016-02-11 15:41  test1\finish.cpp

     文件        273  2016-02-11 15:41  test1\finish.h

     文件        398  2016-02-11 15:47  test1\finish.ui

     文件      65630  2015-09-21 15:42  test1\image\bianfuxia.png

     文件       8857  2015-12-08 19:49  test1\image\book.jpg

     文件     270398  2016-02-19 14:22  test1\image\cafecat.ico

     文件     270398  2016-02-17 10:33  test1\image\cat.ico

     文件      12475  2014-09-11 22:25  test1\image\delete.png

     文件     259539  2015-01-27 15:05  test1\image\Enter.png

     文件     108809  2015-01-27 15:43  test1\image\exit.png

     文件      14154  2005-06-08 14:46  test1\image\find.png

     文件      91011  2016-02-18 10:46  test1\image\green.jpg

     文件      48481  2016-02-18 11:17  test1\image\light.png

     文件      16289  2011-03-10 10:17  test1\image\log.png

     文件       8008  2015-12-10 22:29  test1\image\loginbk.jpg

     文件    1393412  2015-12-08 17:59  test1\image\loginbk.png

     文件     274738  2015-12-10 22:31  test1\image\loginbk1.jpg

     文件      65830  2015-09-21 15:42  test1\image\m1.png

     文件      70701  2015-09-21 15:38  test1\image\m10.png

     文件      52354  2015-09-21 15:42  test1\image\m11.png

     文件      79156  2015-09-21 15:39  test1\image\m12.png

     文件      79355  2015-09-21 15:40  test1\image\m13.png

     文件     107718  2015-09-21 15:37  test1\image\m14.png

     文件      62439  2015-09-21 15:40  test1\image\m15.png

     文件      60450  2015-09-21 15:41  test1\image\m16.png

............此处省略74个文件信息

评论

共有 条评论