diff --git a/QChatClient/chatroom.cpp b/QChatClient/chatroom.cpp index be4b8c5..da17c68 100644 --- a/QChatClient/chatroom.cpp +++ b/QChatClient/chatroom.cpp @@ -189,6 +189,7 @@ void Chatroom::setConnected(bool status) this->ui->inputText->setReadOnly(true); this->ui->sendButton->setDisabled(true); this->ui->actionDisconnect->setDisabled(true); + this->ui->userList->clear(); } else if(status == true) { @@ -373,11 +374,7 @@ void Chatroom::startSession() LoginScreen login(&s,this); login.exec(); int result = login.result(); - if(result == QDialog::Accepted) - { - ui->inputText->setReadOnly(false); - } - else if(result == QDialog::Rejected) + if(result == QDialog::Rejected) { return; } diff --git a/QChatClient/chatroom.ui b/QChatClient/chatroom.ui index 0905cd5..8c6539a 100644 --- a/QChatClient/chatroom.ui +++ b/QChatClient/chatroom.ui @@ -69,6 +69,9 @@ + + true + 0 diff --git a/build-QChatClient-Desktop-Debug/QChatClient b/build-QChatClient-Desktop-Debug/QChatClient index b368172..60f4e9d 100755 --- a/build-QChatClient-Desktop-Debug/QChatClient +++ b/build-QChatClient-Desktop-Debug/QChatClient diff --git a/build-QChatClient-Desktop-Debug/ui_chatroom.h b/build-QChatClient-Desktop-Debug/ui_chatroom.h index c355dd4..6b17446 100644 --- a/build-QChatClient-Desktop-Debug/ui_chatroom.h +++ b/build-QChatClient-Desktop-Debug/ui_chatroom.h @@ -97,6 +97,7 @@ public: windowSplitter->addWidget(chatWindow); userList = new QListWidget(windowSplitter); userList->setObjectName(QStringLiteral("userList")); + userList->setEnabled(true); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0);