Add basic support for replies (#292)
This commit is contained in:
parent
d56446ce97
commit
5b5d35fd1f
7 changed files with 41 additions and 1 deletions
|
|
@ -614,3 +614,14 @@ TextInputWidget::paintEvent(QPaintEvent *)
|
|||
p.setPen(QPen(borderColor()));
|
||||
p.drawLine(QPointF(0, 0), QPointF(width(), 0));
|
||||
}
|
||||
|
||||
void
|
||||
TextInputWidget::addReply(const QString &username, const QString &msg)
|
||||
{
|
||||
input_->setText(QString("> %1: %2\n\n").arg(username).arg(msg));
|
||||
input_->setFocus();
|
||||
|
||||
auto cursor = input_->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
input_->setTextCursor(cursor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue