QTextEdit, , . textChanged() QTextCursor, , , HTML-:
QObject::connect(textEdit, SIGNAL(textChanged()), this, SLOT(changePixmap()),Qt::QueuedConnection) ;
void CSmsWidget::changePixmap()
{
QRegExp reg(":\\)");
QTextCursor cursor(textEdit->document()->find(reg));
if (!cursor.isNull())
{
cursor.insertHtml("<img src=\":/images/happy_smilie.png\">");
}
}