文章来源:https://www.toymoban.com/news/detail-568253.html
文章来源地址https://www.toymoban.com/news/detail-568253.html
#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
connect(ui->pushButton, &QPushButton::clicked, this, [=](int state){
qDebug() << "state is " << state << endl;
if (state == 0)
{
qDebug() << "飞流直下三千尺" << state << endl;
QString user = ui->lineEdit_2->text();
QString password = ui->lineEdit->text();
qDebug() << "user is " << user << endl;
qDebug() << "password is " << password << endl;
}
});
}
Widget::~Widget()
{
delete ui;
}
到了这里,关于qt 获取登录界面账号和密码的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!