Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2, 6.0.1
-
None
-
-
8aae49019d (qt/qtbase/dev) 8aae49019d (qt/tqtc-qtbase/dev) b3bb20b8bc (qt/qtbase/6.4) b3bb20b8bc (qt/tqtc-qtbase/6.4) 5b5ffd4a2c (qt/tqtc-qtbase/6.2)
Description
When a QTextEdit has some invisible blocks, QTextEdit::cursorForPosition() sometimes returns a QTextCursor inside an invisible block (when you click in between blocks where the invisible block would be). If you get the QRectF for this cursor, it will often not be where it is supposed to since the invisible block doesn't have valid coordinates. So if you have a QTextEdit with some invisible blocks, even just clicking around, the cursor will sometimes jump to random other blocks. I created a minimal example to show this bug. The example populates a QTextEdit with 500 blocks and makes roughly half of them invisible. If you click in between two blocks (in the margin space) where an invisible block would be, the cursor will often jump/go to random places it shouldn't be. Feel free to contact me for more information.
Attachments
For Gerrit Dashboard: QTBUG-91774 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
430710,1 | QTextDocumentLayout: Account for topMargin when hit-testing | 6.3 | qt/qtbase | Status: NEW | 0 | 0 |
378703,8 | QTextDocumentLayout: Account for topMargin when hit-testing | dev | qt/qtbase | Status: MERGED | +2 | 0 |
430718,2 | QTextDocumentLayout: Account for topMargin when hit-testing | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
430798,2 | QTextDocumentLayout: Account for topMargin when hit-testing | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |