mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 09:01:50 +08:00
update SelfInfoWidget
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user