equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the examples of the Qt Toolkit. |
7 ** This file is part of the examples of the Qt Toolkit. |
8 ** |
8 ** |
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 |