Custom Virtual Keyboard issue
-
Hi,
Long story short: How can different custom keyboard layouts be used in the same application but on different QML forms?
I'm using Qt 5.9.4 on Ubuntu 16.04.
I have Qt Quick application that I want to have different keyboard layout on the different QML forms.
Currently the virtual keyboard is working fine but it is the same layout on every screen.I have copied the en_GB layout from Qt folder and modified it for my needs.
Using this line of code I have successfully added the new custom layout:qputenv("QT_VIRTUALKEYBOARD_LAYOUT_PATH", "/path/to/layouts");
But this way the custom keyboard is shown on every QML form.
Thank you.
-
@milen.vichev
I know nothing about this. But while you're waiting for anyone else to answer: assuming that Qt responds to whateverQT_VIRTUALKEYBOARD_LAYOUT_PATH
happens to be at the instant a form is shown (and doesn't cache a previously used value) you could try re-issuing the desiredqputenv("QT_VIRTUALKEYBOARD_LAYOUT_PATH", "/path/to/layouts");
with a different layout just before each form gets opened (via whatever signal tells you a form is about to be loaded/displayed)? -
@JonB ,
Thank you.
Tried it but unfortunately it does not work. Probably because all of my QML forms are loaded in StackLayout and after that the environment variables are not read any more.