widget:
#include "widget.h"
#include "ui_widget.h"
void Widget::my_slots()
{
QString userName=this->edit1->text();
QString pwd=this->edit2->text();
if((userName=="1") && (pwd=="1"))
{
qDebug() << "登录成功" ;
emit jump();
speecher->say("哈哈哈哈");
this->close();
}
else
{
qDebug() << "登录失败" ;
speecher->say("嘻嘻嘻嘻");
}
}
void Widget::btn2_slots()
{
close();
}
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
this->setFixedSize(640,520);
//设置窗口标题
this->setWindowTitle("QQ");
//设置窗口图标
this->setWindowIcon(QIcon(":/Log