Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.7.2
-
window 11
Description
When using TextArea, I insert QTextFrame and a piece of text through C++ code. When I use Qt 6.7.2, selecting text in one QTextFrame causes the text style in other QTextFrames to exhibit strange issues. This problem does not occur in Qt 6.6 and Qt 6.5.
// code placeholder for (int i = 0; i < 100; i++) { QTextFrameFormat contentTextFrameFormat; contentTextFrameFormat.setPadding(9); contentTextFrameFormat.setLeftMargin(9); contentTextFrameFormat.setRightMargin(9); contentTextFrameFormat.setBackground(QColor(201, 231, 255)); auto contentTextFrame = rootFrame->lastCursorPosition().insertFrame(contentTextFrameFormat); QTextCharFormat contentTextCharFormat; auto font = defaultFont; font.setPointSize(10); contentTextCharFormat.setFont(font); contentTextFrame->lastCursorPosition().insertText("sample text", contentTextCharFormat); }
===normal text style===
=== error text style ===