I have a piece of code, in variable "line" is text with html tags. I don't know how to add line in message box with converted text to html
void SimpleChatClient::receiveMessage() {
qint64 bytes = buffer->write(socket->readAll());
buffer->seek(buffer->pos() - bytes);
while (buffer->canReadLine()) {
chat->append(line.simplified().toUtf8());
}
}
void SimpleChatClient::receiveMessage() {
qint64 bytes = buffer->write(socket->readAll());
buffer->seek(buffer->pos() - bytes);
while (buffer->canReadLine()) {
QString line = buffer->readLine();
chat->append(line.simplified().toUtf8());
QApplication::alert(this);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks