zgulser
1st April 2014, 21:15
Hi all,
I have a chat program and I don't know how to display strings like "Hello :-)". You see I want to display it like "Hello :)". To do so, I need do sort of smilify the text content. I've found and used the following but couldn't make it work.
QTextDocument *doc = new QTextDocument();
doc->setHtml(textMessage);
doc->drawContents(painter, messageRect);
I've attached my delegate class for you to analyze if you want.
Regards.
I have a chat program and I don't know how to display strings like "Hello :-)". You see I want to display it like "Hello :)". To do so, I need do sort of smilify the text content. I've found and used the following but couldn't make it work.
QTextDocument *doc = new QTextDocument();
doc->setHtml(textMessage);
doc->drawContents(painter, messageRect);
I've attached my delegate class for you to analyze if you want.
Regards.