From 00be899bd0265673669079ecefdcd451e9f232ed Mon Sep 17 00:00:00 2001 From: liuminghang Date: Wed, 23 Jun 2021 17:38:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3bug84966?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 读取文字完成后,将编辑edit恢复到最上方 Log: 与编辑有关 Bug: https://pms.uniontech.com/zentao/bug-view-84966.html Change-Id: Idb43a72f249211b1ce1616d73c65e7cfc7011c26 --- src/mainwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 0af882a..74a465b 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -332,6 +332,9 @@ void MainWidget::loadString(const QString &string) if (!string.isEmpty()) { m_resultWidget->setCurrentWidget(m_plainTextEdit); m_plainTextEdit->appendPlainText(string); + //读取完了显示在最上方 + m_plainTextEdit->moveCursor(QTextCursor::Start) ; + m_plainTextEdit->ensureCursorVisible() ; //新增识别完成按钮恢复 if (m_copyBtn) { m_copyBtn->setEnabled(true);