If you're using a Qt version earlier than 5.9, I think that you have to patch Qt Virtual Keyboard to add your custom layout and then rebuild it. It should be enough to modify this file by adding your own entry. For example:
contains(CONFIG, lang-tr.*) {
LAYOUT_FILES += \
content/layouts/tr_TR/main.qml
}
If you're using Qt 5.9 or later, you can set the QT_VIRTUALKEYBOARD_LAYOUT_PATH environment variable to the path of your custom style, as mentioned here:
The virtual keyboard layouts system supports built-in layouts as well as custom layouts. The built-in layouts are embedded as Qt Resources into the plugin binary. Custom layouts are located in the file system, so that they can be installed without recompiling the virtual keyboard itself, or they can be located in a resource file.
The selection of layouts at runtime is affected by the QT_VIRTUALKEYBOARD_LAYOUT_PATH environment variable.
In case the environment variable is not set, or contains an invalid directory, the virtual keyboard falls back to the default built-in layouts.
To prevent the built-in layouts from being built into the virtual keyboard plugin when using custom layouts, add disable-layouts to the CONFIG qmake variable. For more information, see Advanced Configuration Options.
To take an example from the module's source code, this test sets it to "/data/layouts".
As another example, suppose your application has the following directory structure:
C:\dev\temp\untitled
│ main.cpp
│ main.qml
│ resources.qrc
│ untitled.pro
│
└───en_GB
dialpad.qml
digits.qml
handwriting.qml
main.qml
numbers.qml
symbols.qml
You would set it to C:\dev\temp\untitled. It expects to see one or more folders, each one named after the language + country code that its layout represents, as seen here.
To verify that it's working, you can copy the en_GB layout from the link above into your project and modify it (I changed the 'Q' key to a 'Z').