Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.1
-
None
Description
Hi,
here is an example of code I've used to replicate the problem (inserting emoji into Text Edit is a lot slower the more emoji it contains):
Window { visible: true width: 640 height: 480 title: qsTr("Hello World") TextEdit { id: te anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right wrapMode: TextEdit.Wrap height: Math.max(te.contentHeight, 100) font.pixelSize: 20 } Timer { id: timer interval: 20 repeat: true property int currentEmojiCount: 0 property int totalCount: 200 property var inputs: [] <- Here put you're own emoji. Jira was not able to create ticker with them... onTriggered: { ++currentEmojiCount if (currentEmojiCount < 200) { var idx = Math.ceil(Math.random() * inputs.length) var input = inputs[idx] te.insert(te.length, input) } else { timer.stop() } } } Text { id: counterText anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right text: timer.currentEmojiCount color: "blue" font.pixelSize: 40 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter } Component.onCompleted: { timer.start() } }
Do you have an idea if something in above code may causing this problem? In test adding emoji to TextEdit is significantly slower over 75 emojis (see video). This is a problem when user would like to add few emojis fastly, but TextEdit is lagging with rendering. Do you have any solution for this problem?
I've tried also to change rendering type to native, but it changes nothing (renderType: Text.NativeRendering).