From 0a68561b23bf9eeed03b823bd62b622767c31295 Mon Sep 17 00:00:00 2001 From: Lu Zhen Date: Fri, 17 Nov 2023 10:32:41 +0800 Subject: [PATCH] fix: ask page can't scroll bottom Log: bug fix Change-Id: I3b9532074a47b736df7be7e79ed5626b8dff364d --- src/plugins/codegeex/widgets/askpagewidget.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/codegeex/widgets/askpagewidget.cpp b/src/plugins/codegeex/widgets/askpagewidget.cpp index fe5366387..ecc249f92 100644 --- a/src/plugins/codegeex/widgets/askpagewidget.cpp +++ b/src/plugins/codegeex/widgets/askpagewidget.cpp @@ -60,10 +60,12 @@ void AskPageWidget::onMessageUpdate(const MessageData &msgData) msgComponents.value(msgData.messageID())->updateMessage(msgData); } - if (scrollArea->verticalScrollBar()->isVisible()) { - int maxValue = scrollArea->verticalScrollBar()->maximum(); - scrollArea->verticalScrollBar()->setValue(maxValue); - } + QTimer::singleShot(100, [this](){ + if (scrollArea->verticalScrollBar()->isVisible()) { + int maxValue = scrollArea->verticalScrollBar()->maximum(); + scrollArea->verticalScrollBar()->setValue(maxValue); + } + }); } void AskPageWidget::onSendBtnClicked()