#include "chatwidget.h" ChatWidget::ChatWidget(QWidget *parent) : QTextEdit(parent) { } void ChatWidget::printServerMsg(const string &str) { this->append("

" + QString::fromStdString(str) + "

"); } void ChatWidget::printMsg(const string &str) { this->append(QString::fromStdString(str)); } void ChatWidget::printStatusMsg(const string &str) { this->append("

" + QString::fromStdString(str) + "

"); }