Important: Please read the Qt Code of Conduct -

Attempting to set default language with 'VirtualKeyboarSettings.local' property

  • I am attempting to set the default language for the Qt Virtual Keyboard using the VirtualKeyboardSettings.local property, for instance:

                    id: virtualKeyboard
                    width: parent.width
                    anchors.centerIn: parent
                    visible: true
                    onActiveChanged: {
                            case 0:
                                VirtualKeyboardSettings.local = "en_US"
                            case 1:
                                VirtualKeyboardSettings.local = ///Here I want Espanol
                            case 2:
                                VirtualKeyboardSettings.local = ///Here I want Francais
                            case 3:
                                VirtualKeyboardSettings.local = ///Here I want Polish

    In the layouts directory I see that each language is given an abbreviation: ar_AR, bg_BG, cs_CZ etc... however, I am not sure what languages those abbreviations refer too. Is there a document somewhere that can tell me which is which?

    I tried printing the list ofavailableLocales to the console:


    but this just prints an empty list. However, the keyboard itself has all the of different locals available for me to switch between so I am not sure how it could be empty. In general, this doesn't seem to be working. Is this not how you use the .local property or is there some switch I need to enable before I can use the .local property that I am not aware of?

Log in to reply