From e2fb3ea8ebdbb96caeaf89473fbcdd50c7d6f73c Mon Sep 17 00:00:00 2001 From: Firefly-29710 <2235501805@qq.com> Date: Mon, 8 Jul 2024 17:38:35 +0800 Subject: [PATCH] avatarpath --- signinwin.cpp | 2 ++ signinwin.h | 1 + 2 files changed, 3 insertions(+) diff --git a/signinwin.cpp b/signinwin.cpp index 0b1c524..9956929 100644 --- a/signinwin.cpp +++ b/signinwin.cpp @@ -113,6 +113,7 @@ void signinwin::on_signinBtn_clicked() //测试用户 //User enrolluser("newuser@example.com","123456"); User enrolluser(IDLine->text(),accoutLine->text(),passwordLine->text()); + enrolluser.avatarpath=fileroad; if(enrolluser.enroll()) QMessageBox::information(this, "成功","注册成功"); else @@ -155,6 +156,7 @@ void signinwin::on_image_clicked() avatarArea->addWidget(avatar,0,Qt::AlignCenter); connect(avatar,&ElaInteractiveCard::clicked,this,&signinwin::on_image_clicked); update(); + fileroad=fileName; } } diff --git a/signinwin.h b/signinwin.h index 303c4c6..5e693cb 100644 --- a/signinwin.h +++ b/signinwin.h @@ -25,6 +25,7 @@ class signinwin:public ElaWidget ElaLineEdit*accoutLine; ElaLineEdit*passwordLine; ElaLineEdit*passagainLine; + QString fileroad=""; private slots: void on_signinBtn_clicked(); void closeEvent(QCloseEvent*Event);