Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to enable other locales in Virtual Keyboard plugin

How to enable other locales in Virtual Keyboard plugin

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 480 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leandro
    wrote on last edited by
    #1

    Hello,

    I have to change/customize the layout of the virtual keyboard, currently I did:

    1. As a layout to my language doesn t exist, I copied and merged the files from en_GB and pt_PT to create the pt_BR locale.
    2. Modified the layout to my needs.
    3. Added rule in the virtualkeyboard.pro file to handle my locale (merge of en_GB and pt_PT):

    contains(CONFIG, lang-pt.BR) {
    LAYOUT_FILES +=
    content/layouts/pt_BR/dialpad.qml
    content/layouts/pt_BR/digits.qml
    content/layouts/pt_BR/handwriting.qml
    content/layouts/pt_BR/numbers.qml
    content/layouts/pt_BR/symbols.qml
    t9write: LAYOUT_FILES +=
    content/layouts/pt_BR/handwriting.qml
    }

    1. Compiled and installed it with: qmake "CONFIG += lang-all lang-pt.BR", make, make install.

    2. Recompiled my project, adding to the InputPanel:

      Component.onCompleted: {
      
           VirtualKeyboardSettings.locale = "pt_BR" 
           console.log("Locale after changing it: " + VirtualKeyboardSettings.locale)
                   VirtualKeyboardSettings.customLayoutsOnly = true
           console.log("locales available: " + VirtualKeyboardSettings.availableLocales)
       }
      
    3. Executed my program, with result in console:

    qml: Locale after changing it: pt_BR
    qml: locales available:

    As you can see, it has no locale available to install.

    I think that qmake / make in some sort is not adding the locale files when compiling.

    Can someone help?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved