How to set item at the top of screen?



  • Hello, i have some issue, i have an item:
    @Item {
    id: pad

    Rectangle {
        id: header
        anchors.top: parent.top
    

    ...@
    and have some input element in the bottom of this item.
    when i click to this input, displaying a virtual keyboard, and header of item main element is hide somewhere on top (in invisible zone).

    How can i set the header in zero y position of devise screen?
    tnx a lot 4 answers.
    ps: i try set header.y to 0 and try to set header.y as 0 - parent.y; parent.y - and haven't result (btw pad.y is always 0)


  • Moderators

    I thik the UI shifting due to keyboard display is built into the OS and can't be controlled from the application. One thing that could work is to extend the application window at the bottom: add an empty rectangle there, or something. I doubt it would help, but it just might.



  • Tnx 4 answer!
    Currently i try to detect height of virtual keyboard, is some one know how can i do that?



  • I am currently set "TextInput" or something like that to be positioned onto the top of screen. That may help.



  • @jiangcaiyang
    Sorry? I don't understand you, could you pls rephrase?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.