Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
4.7.2
-
None
Description
QPlainTextEdit may hang trying to adjust its scroll bars.
There is a combination of sizes possible (new size in resizeEvent(), maximumViewportSize(), etc) when new size in resizeEvent() is close to maximumViewportSize() and QPlainTextEdit starts adjusting horizontal and vertical scroll bars and keeps alternately showing one and hiding another one.
Found the problem in my application where custom widget was derived from QPlainTextEdit. Then successfully reproduced the same problem in Designer with original QPlainTextEdit: create frame, layout QPlainTextEdit horizontally in there, add some text (in my case text contained 14 lines with maximum string width about 70 symbols), then play resizing frame (does not matter whether in design mode or preview) to get to the point when both vertical and horizontal scrolls appear with no space to slide. It will eventually stuck doing resizeEvent() endlessly, adjusting scrollbars' ranges.
Attachments
Issue Links
- duplicates
-
QTBUG-62818 QPlainTextEdit::setPlainText goes to infinite loop
- Closed