Commit 5db313caee0665b4faf9db00e8f6b34620e952fa

Authored by Imanol-Mikel Barba Sabariego
1 parent 9db8b86d

git-svn-id: svn://imanolbarba.net/PAD@47 c2ee353e-ed0d-4329-bf56-03aec153487f

QChatClient/chatroom.cpp
... ... @@ -189,6 +189,7 @@ void Chatroom::setConnected(bool status)
189 189 this->ui->inputText->setReadOnly(true);
190 190 this->ui->sendButton->setDisabled(true);
191 191 this->ui->actionDisconnect->setDisabled(true);
  192 + this->ui->userList->clear();
192 193 }
193 194 else if(status == true)
194 195 {
... ... @@ -373,11 +374,7 @@ void Chatroom::startSession()
373 374 LoginScreen login(&s,this);
374 375 login.exec();
375 376 int result = login.result();
376   - if(result == QDialog::Accepted)
377   - {
378   - ui->inputText->setReadOnly(false);
379   - }
380   - else if(result == QDialog::Rejected)
  377 + if(result == QDialog::Rejected)
381 378 {
382 379 return;
383 380 }
... ...
QChatClient/chatroom.ui
... ... @@ -69,6 +69,9 @@
69 69 </layout>
70 70 </widget>
71 71 <widget class="QListWidget" name="userList">
  72 + <property name="enabled">
  73 + <bool>true</bool>
  74 + </property>
72 75 <property name="sizePolicy">
73 76 <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
74 77 <horstretch>0</horstretch>
... ...
build-QChatClient-Desktop-Debug/QChatClient
No preview for this file type
build-QChatClient-Desktop-Debug/ui_chatroom.h
... ... @@ -97,6 +97,7 @@ public:
97 97 windowSplitter->addWidget(chatWindow);
98 98 userList = new QListWidget(windowSplitter);
99 99 userList->setObjectName(QStringLiteral("userList"));
  100 + userList->setEnabled(true);
100 101 QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding);
101 102 sizePolicy1.setHorizontalStretch(0);
102 103 sizePolicy1.setVerticalStretch(0);
... ...