passwdform.ui.h
来自「简单的基于文件的数据库小程序」· C头文件 代码 · 共 45 行
H
45 行
/****************************************************************************** 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 passwdForm::checkPasswd(){ QString n = userName->text(); string p = passwd->text(); char name[20]; char password[50]; FILE* fp= fopen("data/password","r"); fscanf(fp,"%s",name); fscanf(fp,"%s",password); string temp = MD5(p).toString(); //std::cout<<password<<endl; //std::cout<<p<<endl; //std::cout<<temp<<endl; if(n==name&&temp==password) { Form1 *form=new Form1(this,"kk"); form->show(); this->close(); } else { userName->setText(""); passwd->setText(""); } fclose(fp); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?