ChatWidget::ChatWidget(QWidget *parent) : QTextEdit(parent) {
setStyleSheet("background-color: rgba(255, 255, 255, 60%)");
+ setTextInteractionFlags(Qt::TextBrowserInteraction);
}
void ChatWidget::setContents(QList<ChatLine *> lines) {
}
void ChatWidget::prependMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
+ ChatLine *line = static_cast<ChatLine*>(msg);
Q_ASSERT(line);
prependChatLine(line);
}
void ChatWidget::appendMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
+ ChatLine *line = static_cast<ChatLine*>(msg);
Q_ASSERT(line);
appendChatLine(line);
}