Important: Please read the Qt Code of Conduct -

My qt virtual keyboard does not change language. (it is disabled)

  • Hi, I have Linux 16.04 with Qt Creator 4.9.2 Based on Qt 5.12.4 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit).
    I want other languages (Persian|Arabic) for my keyboard. I know in Qt Creator in should set:
    -In "Build Step" qmake, add in additional arguments: CONFIG+=lang-all
    -Add Build Step "make" with argument "install"
    But when I open basic example (I do above in basic but nothing happen) the change language button is disabled.

  • Lifetime Qt Champion


    Might be a silly question but: are you using the same Qt version you use for building the virtual keyboard for your application ?

  • I use qt virtual keyboard 5.12 and I download qt 5.13,(also I check virtualkeyboard5.9 with qmake 5.9) but it does not work. I really don't know how to enable other languages.
    when I want to see the source file and open /home/arm/virtul_keyboard/qtvirtualkeyboard-5.9/src/virtualkeyboard and compile it ,shows me this error :
    /home/arm/Qt5.9.1/5.9.1/gcc_64/mkspecs/features/qt_plugin.prf:59: error: Cannot write file /mkspecs/modules-inst/qt_plugin_qtvirtualkeyboardplugin.pri: Cannot create parent directory

  • Lifetime Qt Champion

    The path shown makes it look like it tries to put stuff at the root of your filesystem which is usually protected from that kind of stuff.

    In order to keep things clean, you should do out of source build so if something goes wrong, just nuke the complete folder and start fresh.

  • I now understand what happened. In this source, Qt compiler(all versions5.9,5.10,5.12) wants to create this directory in root.

    how can I change this?

    in virtual keyboard folder, I have this directory(/mkspec/....) but it does not in root directory. it was at home directory.

    something strange happens. when I compile basic example with qt 5.9 the change language button is disabled(run on my PC).

    when I compile it with 5.10 and run release on an embedded device(my device just accept this Qt version), it shows me this two languages: qml: en_GB,zh_CN
    and when I compile basic example on my ubuntu pc, with qt5.12 the button for language changing is work perfectly. It shows all the languages.

    I did not change anything in the example but I see a different result for each version of the compiler.
    NOTE: I should run Persian on my embedded device and I don't know how to solve this problem.

  • Lifetime Qt Champion

    One thing I would do is starting by ensuring the sources are clean maybe even clone/download them anew.

  • As you guess true, The source has errors. I redownload it again but the errors avoid to compile virtual keyboard(5.12). I correct them one by one. Finally, I compile it with qmake5.12, and it is success.
    but now I need to compile the source for qt5.10. In another post, I read your reply that does not good to compile the source in the upper version with lower qt version. my source is 5.12 but my compiler is 5.10. how can I compile it now?
    Is there any source for qt virtual keyboard for 5.10 version over the internet?

  • Lifetime Qt Champion

    All Qt sources are available at

    Nothing with trying to build a more recent version of a module with an older version of qtbase but you have to be careful with regards to the minimum requirement of that module.

  • Finally, I compile it.
    now I replace ../qtvirtualkeyboard-5.10/plugins/platforminputcontexts/ to the same file name in my embedded device and run demo file.
    now some languages character does not show good. Is this missing font?

  • Lifetime Qt Champion

    Could be depending on the language you are using and the corresponding fonts.

  • it solved. my device updated the os and in this new version, supports Persian and Arabic fonts.
    really thanks a lot.

Log in to reply