Component.onStart ?
-
wrote on 9 Sept 2019, 14:21 last edited by
I have a bit of a problem. I am setting
VirtualKeyboardSettings.locale
just prior to creating a component in this rectanglesMouseArea{}
based on an index (0-3):MouseArea { anchors.fill: parent onClicked: { switch(languageManager.localeIndex) { case 0: VirtualKeyboardSettings.locale = "en_US" break; case 1: VirtualKeyboardSettings.locale = "es_ES" break; case 2: VirtualKeyboardSettings.locale = "fr_FR" break; case 3: VirtualKeyboardSettings.locale = "pl_PL" break; } minMaxSplitBtn.showKeyboard() } }
The component itself hosts the QTVK's
InputPanel{}
who'svisible
property is set to true. I am looking for a way to set theVirtualKeyboardSettings.locale
the moment the component is created but from within the component's .qml file rather than doing it here where the component is being created. Is that possible? I figured it would be something like:Component.start
or something along those lines if it did exist. Perhaps I could make this a property or something along those lines? -
wrote on 10 Sept 2019, 14:27 last edited by
Perhaps this isn't necessary? Is there some way for me to set the .local for the keyboard in c++ code? In the business logic?
-
I have a bit of a problem. I am setting
VirtualKeyboardSettings.locale
just prior to creating a component in this rectanglesMouseArea{}
based on an index (0-3):MouseArea { anchors.fill: parent onClicked: { switch(languageManager.localeIndex) { case 0: VirtualKeyboardSettings.locale = "en_US" break; case 1: VirtualKeyboardSettings.locale = "es_ES" break; case 2: VirtualKeyboardSettings.locale = "fr_FR" break; case 3: VirtualKeyboardSettings.locale = "pl_PL" break; } minMaxSplitBtn.showKeyboard() } }
The component itself hosts the QTVK's
InputPanel{}
who'svisible
property is set to true. I am looking for a way to set theVirtualKeyboardSettings.locale
the moment the component is created but from within the component's .qml file rather than doing it here where the component is being created. Is that possible? I figured it would be something like:Component.start
or something along those lines if it did exist. Perhaps I could make this a property or something along those lines?wrote on 10 Sept 2019, 14:46 last edited by@circuits said in Component.onStart ?:
I figured it would be something like: Component.start or something along those lines if it did exist
-
@circuits said in Component.onStart ?:
I figured it would be something like: Component.start or something along those lines if it did exist
1/4