How to enable the language switcher in the Qt Quick Virtual Keyboard - Basic Example
Hi. I am new to Qt Creator on Linux. From the Welcome screen I opened "Qt Quick Virtual Keyboard - Basic Example". It runs great, but I want to enable the language switcher to the left of the space bar.
From the documentation and threads on this forum, I understand that I should add
CONFIG += lang-all, but I cannot figure out where, or how to make it take effect.
My project has a file
basic.pro, but adding
CONFIG += lang-allthere has no effect. I think I need to modify the qtvirtualkeyboard itself, and not just the example. There is no
virtualkeyboard.proin my project. There are 7 different ones spread around the Qt installation:
Should I modify one of those, and how do I rebuild virtualkeyboard so it uses the new config?
I can build and run the example from the command line:
cd Examples/Qt-5.10.0/virtualkeyboard/basic /sw/bin/qt/5.10.0/gcc_64/bin/qmake "CONFIG+=lang-all" make "CONFIG+=lang-all" ./basic
...but the language switcher is still disabled. I think it's because again, I need to rebuild the virtualkeyboard plugin and not just the example.
Update: I got a lot further.
cd qt/5.10.0/Src/qtvirtualkeyboard/src/virtualkeyboard /sw/bin/qt/5.10.0/gcc_64/bin/qmake CONFIG+="lang-all" && make && make install
It will give errors like
Library 'pinyin' is not defined.
cd qt/5.10.0/Src/qtvirtualkeyboard/src/virtualkeyboard/3rdparty/openwnn /sw/bin/qt/5.10.0/gcc_64/bin/qmake && make
Same for pinyin, tcime, then go back and build virtualkeyboard.
basicdoesn't need to be rebuilt, just run it. I guess qtvirtualkeyboard is dynamically linked. Unclear how it knows where it load it from.
Now language switcher is enabled, and I can scroll through a long list of languages! I wish I knew how to do all this inside QtCreator though.
Languages like Japanese that need an IME are still broken. When I pick it, there is an error:
qml: Qt.createQmlObject(): failed to create object: qrc:/QtQuick/VirtualKeyboard/content/layouts/ja_JP/japaneseInputMethod:1:57: JapaneseInputMethod is not a type
openwnnis still not loaded correctly. Any ideas?