Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Does VirtualKeyboard offer any way to have a dark transparent overlay surrounding the TextField that activates the inputPanel?

    QML and Qt Quick
    qml virtualkeyboard overlay input panel
    2
    2
    389
    Loading More Posts
    • 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.
    • R
      red.green last edited by red.green

      I'm very new to QML. I have a TextField which activates VirtualKeyboard when it has the focus. I would like to have a dark transparent overlay surrounding this TextField which only appears when the VirtualKeyboard is activated by the TextField. Is there any built-in method in VirtualKeyboard do accomplish this?

      Thanks

      J.Hilk 1 Reply Last reply Reply Quote 0
      • J.Hilk
        J.Hilk Moderators @red.green last edited by

        @red.green
        hi, I'm unfamiliar with the virtual keyboard.

        But I have the following idea.

        inside your TextField, you listend to onActiveFocusChanged if that becomes true, that the virtual keyboard should be called forth.

        On you can than listen to the editingFinished signal and force the focus on the parent. to guarantee that the active focus is really gone after editing

        Item{//arbitary parent
        TextField{
             onActiveFocusChanged: if(activeFocus) //do stuff
             onEditingFinished: parent.forceActiveFocus()
        }
        }
        

        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct

        Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post