Commit 5db313caee0665b4faf9db00e8f6b34620e952fa
1 parent
9db8b86d
git-svn-id: svn://imanolbarba.net/PAD@47 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
4 changed files
with
6 additions
and
5 deletions
QChatClient/chatroom.cpp
@@ -189,6 +189,7 @@ void Chatroom::setConnected(bool status) | @@ -189,6 +189,7 @@ void Chatroom::setConnected(bool status) | ||
189 | this->ui->inputText->setReadOnly(true); | 189 | this->ui->inputText->setReadOnly(true); |
190 | this->ui->sendButton->setDisabled(true); | 190 | this->ui->sendButton->setDisabled(true); |
191 | this->ui->actionDisconnect->setDisabled(true); | 191 | this->ui->actionDisconnect->setDisabled(true); |
192 | + this->ui->userList->clear(); | ||
192 | } | 193 | } |
193 | else if(status == true) | 194 | else if(status == true) |
194 | { | 195 | { |
@@ -373,11 +374,7 @@ void Chatroom::startSession() | @@ -373,11 +374,7 @@ void Chatroom::startSession() | ||
373 | LoginScreen login(&s,this); | 374 | LoginScreen login(&s,this); |
374 | login.exec(); | 375 | login.exec(); |
375 | int result = login.result(); | 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 | return; | 379 | return; |
383 | } | 380 | } |
QChatClient/chatroom.ui
@@ -69,6 +69,9 @@ | @@ -69,6 +69,9 @@ | ||
69 | </layout> | 69 | </layout> |
70 | </widget> | 70 | </widget> |
71 | <widget class="QListWidget" name="userList"> | 71 | <widget class="QListWidget" name="userList"> |
72 | + <property name="enabled"> | ||
73 | + <bool>true</bool> | ||
74 | + </property> | ||
72 | <property name="sizePolicy"> | 75 | <property name="sizePolicy"> |
73 | <sizepolicy hsizetype="Ignored" vsizetype="Expanding"> | 76 | <sizepolicy hsizetype="Ignored" vsizetype="Expanding"> |
74 | <horstretch>0</horstretch> | 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,6 +97,7 @@ public: | ||
97 | windowSplitter->addWidget(chatWindow); | 97 | windowSplitter->addWidget(chatWindow); |
98 | userList = new QListWidget(windowSplitter); | 98 | userList = new QListWidget(windowSplitter); |
99 | userList->setObjectName(QStringLiteral("userList")); | 99 | userList->setObjectName(QStringLiteral("userList")); |
100 | + userList->setEnabled(true); | ||
100 | QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); | 101 | QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); |
101 | sizePolicy1.setHorizontalStretch(0); | 102 | sizePolicy1.setHorizontalStretch(0); |
102 | sizePolicy1.setVerticalStretch(0); | 103 | sizePolicy1.setVerticalStretch(0); |