examples/network/network-chat/chatdialog.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
    77         return;
    77         return;
    78 
    78 
    79     QTextCursor cursor(textEdit->textCursor());
    79     QTextCursor cursor(textEdit->textCursor());
    80     cursor.movePosition(QTextCursor::End);
    80     cursor.movePosition(QTextCursor::End);
    81     QTextTable *table = cursor.insertTable(1, 2, tableFormat);
    81     QTextTable *table = cursor.insertTable(1, 2, tableFormat);
    82     table->cellAt(0, 0).firstCursorPosition().insertText("<" + from + "> ");
    82     table->cellAt(0, 0).firstCursorPosition().insertText('<' + from + "> ");
    83     table->cellAt(0, 1).firstCursorPosition().insertText(message);
    83     table->cellAt(0, 1).firstCursorPosition().insertText(message);
    84     QScrollBar *bar = textEdit->verticalScrollBar();
    84     QScrollBar *bar = textEdit->verticalScrollBar();
    85     bar->setValue(bar->maximum());
    85     bar->setValue(bar->maximum());
    86 }
    86 }
    87 
    87