Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.4.2, 5.5.0, 5.6.0, 5.6.1, 5.7.0
-
None
-
Linux x64 but happens on all OSes
Description
When word wrapping occurs on a word that is followed by a non-breaking space and the non-breaking space has some additional formatting applied to it, the first two characters from the word are not displayed by QPlainTextEdit.
See the attached demo program and screenshot.
Run the demo program (which is a minimal test case) and resize the window so that the word badly gets pushed to a second line. Note that the first two characters "ba" are no longer displayed (they appear to have been clipped).
This does not happen if the additional format is not applied. In the demo the additional formatting is a red background for the non-breaking space character, but the actual formatting does not matter, it happens even with an empty format.
This bug happens with both QPlainTextEdit and QTextEdit, which likely means that the actual bug is in QTextLayout.
Attachments
Issue Links
- is duplicated by
-
QTBUG-54761 Displaying non-breaking space in QPlainTextEdit/QTextEdit with word wrap enabled
- Closed