Commit 13705999 by xiaoqing.gu

添加登录成功提示界面

parent d27d0ead
......@@ -78,6 +78,7 @@ void FMPLogin::on_login_btn_clicked()
this->setEnabled(false);
if(login(ui->user_edit->text(), ui->pwd_edit->text())) {
FMPMessage::success(this,QString::fromLocal8Bit("登录成功!"));
this->close();
} else {
FMPMessage::critical(this, _errorMsg);
......
......@@ -54,3 +54,10 @@ int FMPMessage::critical(QWidget *parent, const QString &msg)
window.SetContent(FMPMessage::ERROR, msg);
return window.exec();
}
int FMPMessage::success(QWidget *parent, const QString &msg)
{
FMPMessage window(parent);
window.SetContent(FMPMessage::SUCCESS, msg);
return window.exec();
}
......@@ -27,6 +27,8 @@ public:
static int critical(QWidget *parent, const QString &msg);
static int success(QWidget *parent, const QString &msg);
private:
Ui::FMPMessage *ui;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment