update SelfInfoWidget

This commit is contained in:
xyz
2025-05-29 21:31:28 +08:00
parent beda1e32ad
commit 38f3a397fd
10 changed files with 283 additions and 44 deletions

View File

@ -39,6 +39,7 @@ MainWidget::MainWidget(QWidget *parent)
initRightWindow();
//初始化信号槽
initSignalSlot();
}
MainWidget::~MainWidget()
@ -224,6 +225,17 @@ void MainWidget::initSignalSlot()
connect(sessionTabBtn, &QPushButton::clicked, this, &MainWidget::switchTabToSession);
connect(friendTabBtn, &QPushButton::clicked, this, &MainWidget::switchTabToFriend);
connect(applyTabBtn, &QPushButton::clicked, this, &MainWidget::switchTabToApply);
/////////////////////////////////////
// 点击自己的头像,弹出对话框显示个人的主页
/////////////////////////////////////
connect(userAvatar, &QPushButton::clicked, this, [=]()->void {
SelfInfoWidget* selfInfoWidget = new SelfInfoWidget(this);
selfInfoWidget->setStyleSheet("QDialog { background-color: rgb(255, 255, 255); }");
selfInfoWidget->exec(); //弹出模态对话框
//selfInfoWidget->show(); //弹出非模态对加框
});
}
void MainWidget::switchTabToSession()