Important: Please read the Qt Code of Conduct -

Qt Virtual Keyboard

  • Hello to eveybody,
    My goal is to write a mobile Qt Application for Raspberry Pi 3. using a 7" touchscreen.
    Because I have heard about a Qt Virtual Keyboard, I am asking if how to install it and if there is the possibility to use as the default virtual keyboard.
    Advanced thanks for helping me.

  • Moderators

  • Yeha, I have already read the link you mentioned; but there are a lot of thing I have not well understood:
    -) Where exactly are the sources to build ?
    -) Once built the source, does it enough to run the executable I get from the building process to install the keyboard ?
    -) How could I recall this keyboard from
    -a) a my personal touch screen Qt application I develop ?
    -b) from anohter third party Raspbian Pi application, for example Open Office Write ?
    Again, thanks for replying me

  • Hi. It is not mandatory to download and compile separately the QtVirtualkeyboard.
    During the installation of Qt framework you can select "QtVirtualKeyboard" to have it installed and working.
    The only difference from the QtVirtualKeyboard included in the Qt framwrork and the QtVirtualKeyboard from source is that the QtVirtualKeyboard in the Qt framerowk has only the english layout. If you want you can compile QtVirtualKeyboard with all the language layouts included.

    After that please remember that QtVirtualKeyboard is a plugin for your softare, and if you have embed it, everytime that you click in a text field it will be appear. QtVirtualKeyboard is not made to replace the standard os keyboard. To have it workink as standard os keyboard you have to write code.

    I use it in a raspberry application.

  • Lifetime Qt Champion

    @mrdebug said in Qt Virtual Keyboard:

    During the installation of Qt framework you can select "QtVirtualKeyboard" to have it installed and working.

    He develops for RaspberryPi - there is no installer for it where you can select Virtual Keyboard. So, he needs to compile it.

  • @mrdebug
    Hello... I have dowloaded and installed QT on my Raspbian but any virtual keyboard appers.....
    So I am asking where I can download QtVirtualKeyboard.
    Is it possible to use the QtVirtualKeyboard as my Raspbian default virtual keyboard ?

  • Lifetime Qt Champion

  • Sorry for the mistake.
    To have QtVirtualKeyboard working on Raspberry Pi, you have to download it from the repository indicated by jsulm.
    After that in your Qt software you have to add these lines of code.

        #ifdef Q_OS_LINUX
            #if defined(Q_OS_ANDROID)
                qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
                qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("retro"));
        #ifdef Q_OS_WIN
            qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
            // cliccando sul globo non compare la lista delle lingue. Bisogna andare in modo cirlocare a cercare quella giusta.
            //qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("retro"));

    To have the QtVirtualKeyboard working with the other applications I think you have to write a driver for your desktop environment (I Think.).

  • @jsulm
    Many thanks for your help and suggestions...
    Now I am little busy with others thinghs, but surely next days I'll try.
    Again thank you very much.

Log in to reply