1.密码
//code实现密码输入遮挡
ui->lineEdit_Passwd->setEchoMode(QLineEdit::Password);
2"QDebug"
类名即为:头文件名
qDebug() << "Date:xxxx ";
//登陆
void Widget::on_pushButton_login_clicked()
{
QString name = ui->lineEdit_Name->text();
QString passwd = ui->lineEdit_Passwd->text();
if(name == passwd){
qDebug() << "登录成功" << endl;
}else{
qDebug() << "登陆失败" << endl;
}
}
测试:
4.01-4-手动编写登录界面实现讲解
核心就就移动生成的ui的代码。注意类要声明。
5.01-5-手动编译qt源代码过程讲解
qmake -project
qmake
make
就完成
1.