summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2021-02-07 11:05:23 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-09 17:52:06 +0000
commitcc5a1473f1fb22321f01b9955225eea1df54f417 (patch)
tree6d582f3da3acca7bbda1b71508bfba24ae7f8e84 /src/widgets
parent56981d3073355c80437786f5d479043e1471a571 (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.cpp1
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