Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to set item at the top of screen?

How to set item at the top of screen?

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxim.prishchepa
    wrote on last edited by
    #1

    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)

    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maxim.prishchepa
        wrote on last edited by
        #3

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

        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jiangcaiyang
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxim.prishchepa
            wrote on last edited by
            #5

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

            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved