+void ChatWidget::insertStyledText(const QtopiaUiStyle::StyledText &stext) {
+ QTextCursor cursor = textCursor();
+ foreach(QTextLayout::FormatRange format, stext.formats) {
+ cursor.setCharFormat(format.format);
+ setTextCursor(cursor);
+ insertPlainText(stext.text.mid(format.start, format.length));
+ }