QTfrontend/chatwidget.cpp
changeset 575 9a18a9b9d7d4
parent 486 7ea71cd3acd5
child 1066 1f1b3686a2b0
equal deleted inserted replaced
574:1cafd9eb1a21 575:9a18a9b9d7d4
    55   chatEditLine->clear();
    55   chatEditLine->clear();
    56 }
    56 }
    57 
    57 
    58 void HWChatWidget::onChatStringFromNet(const QStringList& str)
    58 void HWChatWidget::onChatStringFromNet(const QStringList& str)
    59 {
    59 {
       
    60   if (str.size() < 2) return;
    60   QListWidget* w=chatText;
    61   QListWidget* w=chatText;
    61   w->addItem(str[0]+": "+str[1]);
    62   w->addItem(str[0]+": "+str[1]);
    62   w->scrollToBottom();
    63   w->scrollToBottom();
    63   w->setSelectionMode(QAbstractItemView::NoSelection);
    64   w->setSelectionMode(QAbstractItemView::NoSelection);
    64 }
    65 }