Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.2
-
None
Description
Calling QTextEdit::cursorForPosition(QPoint(0, 0)) may return a QTextCursor with an incorrect block(), when the text edit's text document has not been laid out yet. It seems like the text document layout's internal hitTest() function returns incorrect results, when the point is (0, 0). After the text edit's text document has been laid out, the QTextCursor's block() is correct.
Calling cursorForPosition(QPoint(0, 1)) works correctly, even though the text edit's text document has not been laid out, so cursorForPosition(QPoint(0, 0)) should also work.