TextFields' cursorPosition has no effect
Unsolved
QML and Qt Quick
-
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 = 1
will do the trick, but not sure whyTextField
have 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....