QT Virtual Keyboard (InputPanel QML Type) Activation from Just One Qt Quick Text Component



  • The QT Virtual Keyboard or (InputPanel QML Type) is very powerful.

    I have managed to get this InputPanel to pop up all the time, that is, when ANY Text Qt Quick component gains focus and hides when lost focus. That works well.

    What I need is to only pop this InputPanel up when the user sets focus to one or two specific Text components, and not globally throughout the application.

    1. First, is this possible?
    2. And if so, is there an example that shows how to do this, or some simple instructions on how to do it?

    Thank you
    Brian



  • Any guidance would be appreciated here.

    Is it possible? Any examples out there to help binding the InputPanel to only one or 2 QtQuick Text components all defined in QML?



  • I worked around this issue by doing the following:

    1. Added the InputPanel to my own custom dialog (File Save) to the bottom of it.
    2. When showing the dialog, I center the dialog on screen, making the InputPanel visible at the bottom of the dialog.
    3. After the user inputs the file name to save to and clicks "Save", the dialog is made invisible.
    4. In the dialog's "onVisibleChanged" signal handler, I set dialog.y = 5000, making the dialog move way offscreen even though it is invisible. Now any other component click events are not interfered with.

    Works pretty well.


Log in to reply
 

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