Set position in TextField
Solved
QML and Qt Quick
-
Hey, I have a
TextField
, which's content is longer than its own width, thus I can only see the end portion of its content (Its "scrolled" to the end). Is there a way to always show the content form the beginning? I've tried settingcursorPosition
, but it did not do the trick.Thanks for any help in advance
-
Thanks, but I just solved it by using:
if(!inputField.activeFocus) inputField.cursorPosition = 0;
at the onTextChanged event
-
Try with ensureVisible(0). It should work.
-
Thanks, but I just solved it by using:
if(!inputField.activeFocus) inputField.cursorPosition = 0;
at the onTextChanged event