From 72357dfc17dfc65196c66b4908767197bc45c437 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Tue, 9 Jun 2020 12:06:46 +0200 Subject: [PATCH] set focus to the last chatItem --- src/controller.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controller.cpp b/src/controller.cpp index 6d02a40..3bb208b 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -1379,6 +1379,8 @@ void Controller::refreshTransactions() { // Update model data, which updates the table view transactionsTableModel->replaceData(txdata); chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat); + ui->listChat->verticalScrollBar()->setValue( + ui->listChat->verticalScrollBar()->maximum()); }); } @@ -1386,6 +1388,8 @@ void Controller::refreshTransactions() { void Controller::refreshChat(QListView *listWidget, QLabel *label) { chat->renderChatBox(ui, listWidget, label); + ui->listChat->verticalScrollBar()->setValue( + ui->listChat->verticalScrollBar()->maximum()); }