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 use virtualkeyboard in popup
Qt 6.11 is out! See what's new in the release blog

How to use virtualkeyboard in popup

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 4 Posters 886 Views 2 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.
  • S Offline
    S Offline
    sonicss
    wrote on last edited by sonicss
    #1

    I made a colordialog popup. I want the user can select the color by RGB or HSV. There are one circle and two slider for HSV. A textfield for RGB. When the textfield get focused, the virtualkeyboard displayed. but the virtualkeybord is Main.qml's child. in this case. the virtualkeyboard is masked(as the pics). How do I use the virtualkeyboard in popup?

    colordialog.png

    1 Reply Last reply
    1
    • F Offline
      F Offline
      felix_u
      wrote last edited by
      #2

      Old post, still same problem here unfortunately. In my case using InputPanel explicitly. InputPanel is not a child of the Popup, but if I understand right it is a Singleton anyway. Any ideas?

      JKSHJ 1 Reply Last reply
      0
      • GrecKoG Offline
        GrecKoG Offline
        GrecKo
        Qt Champions 2018
        wrote last edited by
        #3

        Do you instantiate the InputPanel yourself?

        1 Reply Last reply
        0
        • F felix_u

          Old post, still same problem here unfortunately. In my case using InputPanel explicitly. InputPanel is not a child of the Popup, but if I understand right it is a Singleton anyway. Any ideas?

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote last edited by
          #4

          @felix_u said in How to use virtualkeyboard in popup:

          In my case using InputPanel explicitly. InputPanel is not a child of the Popup, but if I understand right it is a Singleton anyway. Any ideas?

          There are no Singletons involved.

          Popups are children of an "overlay item" (see https://doc.qt.io/qt-6/qml-qtquick-controls-overlay.html) which has a very high z-value. So, you must:

          • Make your keyboard a sibling of that overlay item, AND
          • Give your keyboard a higher z-value than that overlay item

          Try this:

          InputPanel {
              parent: Overlay.overlay.parent // Make the keyboard a sibling of the overlay
              z: Overlay.overlay.z + 1 // Give the keyboard a higher z-value than the overlay
              // ...
          }
          

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          2
          • F Offline
            F Offline
            felix_u
            wrote last edited by
            #5

            Hi Guys,
            thanks for replying - I need to enable my email notifications... Also sorry for not being able to provide example code. I am explicitly instancing the InputPanel myself - and not so long ago learned that really only one instance is needed. Still it is a matter of where placing the instance inside the QML hierarchy as Overlays are special, because they are not part of the hierarchical structure.

            parent: Overlay.overlay
            

            did not work in the first place. I am not exactly sure what finally did the trick but it might have been placing the InputPanel as a direct child to the Window (and thus making it a sibling - not a child - to contentItem). Works now.

            Thanks so much
            Felix

            1 Reply Last reply
            1

            • Login

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