网站的建设可以起到什么作用,wordpress站点标题看不到,做网站导流,有哪些是用到了网站推广1 2.
使用手动连接#xff0c;将登录框中的取消按钮使用qt4版本的连接到自定义的槽函数中#xff0c;在自定义的槽函数中调用关闭函数#xff0c;将登录按钮使用t5版本的连接到自定义的槽函数中#xff0c;在槽函数中判断ui界面上输入的账号是否为admin#…1 2.
使用手动连接将登录框中的取消按钮使用qt4版本的连接到自定义的槽函数中在自定义的槽函数中调用关闭函数将登录按钮使用t5版本的连接到自定义的槽函数中在槽函数中判断ui界面上输入的账号是否为admin密码是否为23456。如果账号密码匹配成功则输出“登录成功”并关闭该界面如果匹配失败则输出登录失败并将密码框中的内容清空
#include mywindow.h
#include ui_mywindow.hmyWindow::myWindow(QWidget *parent): QWidget(parent), ui(new Ui::myWindow)
{ui-setupUi(this);//动图QMovie *mvnew QMovie(C:\\Users\\18065\\Desktop\\pictrue\\kun.gif);//设置父类mv-setParent(this);ui-Lable1-setMovie(mv);mv-start();ui-Lable1-setScaledContents(true);ui-Label2-setPixmap(QPixmap(C:\\Users\\18065\\Desktop\\pictrue\\tou.jpg));ui-Label3-setPixmap(QPixmap(C:\\Users\\18065\\Desktop\\pictrue\\tou.jpg));connect(ui-Bton2,SIGNAL(clicked()),this,SLOT(my_function()));connect(ui-Bton,QPushButton::clicked,this,myWindow::my_function2);
}void myWindow::my_function()
{emit close();
}
void myWindow::my_function2()
{if((ui-lineEdit1-text() admin) (ui-lineEdit2-text() 123456)){qDebug() 登陆成功;emit close();}else{qDebug() 登录失败;ui-lineEdit2-setText();}
}