From bfc40bd3e70ccfaba6ed2908e53b41ac7275f49b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 11 Apr 2020 16:29:42 +0200 Subject: [PATCH] gui/SearchWindow.cpp: Force scrollbar to the bottom when adding text to m_output. --- gui/SearchWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/SearchWindow.cpp b/gui/SearchWindow.cpp index e34f556..ba3a757 100644 --- a/gui/SearchWindow.cpp +++ b/gui/SearchWindow.cpp @@ -23,6 +23,7 @@ */ #include #include +#include #include #include #include @@ -175,6 +176,9 @@ void SearchWindow::output(const QString& html) } else { m_output.setHtml(html); } + + // Force scrollbar to the bottom. + m_output.verticalScrollBar()->setValue(m_output.verticalScrollBar()->maximum()); } void SearchWindow::searchStarted()