Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Looking for Widget based QtVirtualKeyboard example



  • Folks,

    I am looking got an example of using Application integration of the QtVirtualKeyboard into a Widgets based application.

    For background, we are trying to port a Qt4 based software suite that runs in a kiosk environment. In Qt4 we used QInputContext to create virtual keypads.

    I suspect in the long run I will end up tweaking the QtVirtualKeyboard source as there are features we want that do no appear to show with the current software (but I could be wrong).

    1. Our keypads are fixed size (not full-screen), with different sizes for different layouts (They are also widget based, but I should be able to redo them in QML). They are repositioned to be relative to the current focus widget.
    2. We have one option where we do not show a keypad for an input, currently controlled by a dynamic property.

    I want to example the Widget example to understand how the integration works and possible get around needing to change the source.

    Thanks,
    Dale Pennington



  • What about this one here? (https://stackoverflow.com/questions/57161308/virtual-keyboard-or-onscreen-keyboard-for-qtwidgets-applications)

    @DalePennington said in Looking for Widget based QtVirtualKeyboard example:

    They are also widget based, but I should be able to redo them in QML

    Even though the keyboard was designed in QML, you can use it in QWidget apps.



  • No that is desktop level integration (as designed in the QtVirtualKeyboard deployment documentation). I can do that already, but then the virtual keyboard takes over the entire screen.
    Application level integration appears to involve manually instantiating an InputPanel in your all. QtVirtualKeyboard has a qml based example of this, but not a QWidget based example.



  • @DalePennington

    Ahh. So you need the keyboard / input panel to be a QWidget itself not used as a separate module together in a QWidget application?!

    I dont know if there's anything like that :/

    @DalePennington said in Looking for Widget based QtVirtualKeyboard example:

    I will end up tweaking the QtVirtualKeyboard source

    Check if you still meet your license requirement then :)



  • @Pl45m4
    The keyboard itself might still be the QML keyboard inside the QtVirtualKeyboard, but for Application level integration that app apparently instantiates the InputPanel instead of having the plugin do it (or so the documentation reads).
    What I am looking for is an example of that to see what really needs to be done.



  • @DalePennington

    I fear, I cant help you in this case, but I found this (probably you've read this before):

     disable-desktop
    

    Remarks
    By default, the desktop integration is enabled when the target environment is X11 or Windows desktop. With this option, the
    desktop integration can be disabled.

    Note: For embedded integration, where the InputPanel is instantitated by the application, there is no need to use this option explicitly. The virtual keyboard will not create the desktop input panel if the application creates InputPanel before the focus is set to an input field.

    (https://doc.qt.io/qt-5/qtvirtualkeyboard-build.html#advanced-configuration-options)


Log in to reply