diff options
author | Wang Chuan <ouchuanm@outlook.com> | 2021-02-07 11:05:23 +0800 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-09 17:52:06 +0000 |
commit | bbdcc86c52d806ab45fabf167526f9dcec291648 (patch) | |
tree | e131e77c82c780a75e1b4f714b48ac32c0bb3e72 /src/widgets | |
parent | 30001fdaf90a22d575c2f4def5a89789508c30aa (diff) |
QPlainTextEdit: adjust scroll bars when showing up
The text of QPlainTextEdit might change when it is invisible, so an
adjustment of scroll bars is needed when the QPlainTextEdit showing
up, otherwise the range of scroll bars might be incorrect.
Fixes: QTBUG-77937
Change-Id: I45c686c7e09ca7b2944c36122e9157de0ec4f0e0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 13ae47d98057c2ddca8c865b845973d7e4c8dd8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/widgets/qplaintextedit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 5f4b46c1cc..d2006d0562 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -2306,6 +2306,7 @@ void QPlainTextEdit::showEvent(QShowEvent *) d->showCursorOnInitialShow = false; ensureCursorVisible(); } + d->_q_adjustScrollbars(); } /*! \reimp |