Qt 6.11 is out! See what's new in the release
blog
TextFields' cursorPosition has no effect
-
I have created a simple TextField with a long text therein. Every time I run the code the LAST part of the text fields shows. Since I set cursorPosition to 1, shouldn't the FIRST part of the text field show?
TextField { x: 0 id: inputField width: 100 text: "Hello World 2! ababaabababababababa" color: gui.colorRGBString(GUIConstants.EColorElement_TextTitle) maximumLength: 128 cursorPosition: 1 } -
Component.onCompleted: cursorPosition = 1will do the trick, but not sure whyTextFieldhave such behaviour. -
Component.onCompleted: cursorPosition = 1will do the trick, but not sure whyTextFieldhave such behaviour.@IntruderExcluder I did figure out the workaround, the behavior just did not make sense to me (since cursorPosition only makes sense once the item is initialized). I assume this bug is already logged somewhere....