QML TextField and overlay keyboard
-
You can get keyboardRectangle() from Qt.inputMethod and use that information to scroll your view.
-
You can get keyboardRectangle() from Qt.inputMethod and use that information to scroll your view.
-
@sierdzio Whith which function should i test it? Flickable does not have a function to move it programmaticaly besides flick( )
@Manu19 said in QML TextField and overlay keyboard:
@sierdzio Whith which function should i test it? Flickable does not have a function to move it programmaticaly besides flick( )
contenxtXis a property. Just set it's value to any value you need and it will update the position automatically.For example:
Button { onClicked: flickable.contentY += 100 } Flicakble { id: flickable // some contents }Or:
Flickable { id: flickable contentY: keyboardRect.height } Rectangle { id: keyboardRect height: keyboardVisible? 500 : 0 } -
@Manu19 said in QML TextField and overlay keyboard:
@sierdzio Whith which function should i test it? Flickable does not have a function to move it programmaticaly besides flick( )
contenxtXis a property. Just set it's value to any value you need and it will update the position automatically.For example:
Button { onClicked: flickable.contentY += 100 } Flicakble { id: flickable // some contents }Or:
Flickable { id: flickable contentY: keyboardRect.height } Rectangle { id: keyboardRect height: keyboardVisible? 500 : 0 } -
@sierdzio Shame on me. I thought contentY would be readOnly. I should go to bed and sleep. Thank you for your patience and for your example
@Manu19 said in QML TextField and overlay keyboard:
@sierdzio Shame on me. I thought contentY would be readOnly. I should go to bed and sleep. Thank you for your patience and for your example
Hehe, no worries. This property actually sounds almost as if it should be read-only. Before I wrote my reply I checked several times if it was writable or not, because I felt intuitively that it could not be :-) So, I understand you 100% here :D