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 the language switcher in the Qt Quick Virtual Keyboard - Basic Example
Forum Updated to NodeBB v4.3 + New Features

How to enable the language switcher in the Qt Quick Virtual Keyboard - Basic Example

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.5k 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.
  • T Offline
    T Offline
    TorKlingberg
    wrote on last edited by TorKlingberg
    #1

    Hi. I am new to Qt Creator on Linux. From the Welcome screen I opened "Qt Quick Virtual Keyboard - Basic Example". It runs great, but I want to enable the language switcher to the left of the space bar.

    From the documentation and threads on this forum, I understand that I should add CONFIG += lang-all, but I cannot figure out where, or how to make it take effect.

    My project has a file basic.pro, but adding CONFIG += lang-all there has no effect. I think I need to modify the qtvirtualkeyboard itself, and not just the example. There is no virtualkeyboard.pro in my project. There are 7 different ones spread around the Qt installation:

    • ./Examples/Qt-5.10.0/virtualkeyboard/virtualkeyboard.pro
    • ./Examples/QtVirtualKeyboard/virtualkeyboard/virtualkeyboard.pro
    • ./5.10.0/Src/qtvirtualkeyboard/examples/virtualkeyboard/virtualkeyboard.pro
    • ./5.10.0/Src/qtvirtualkeyboard/src/virtualkeyboard/virtualkeyboard.pro
    • ./EnterpriseAddOns/QtVirtualKeyboard/2.0/Src/virtualkeyboard.pro
    • ./EnterpriseAddOns/QtVirtualKeyboard/2.0/Src/examples/virtualkeyboard/virtualkeyboard.pro
    • ./EnterpriseAddOns/QtVirtualKeyboard/2.0/Src/src/virtualkeyboard/virtualkeyboard.pro

    Should I modify one of those, and how do I rebuild virtualkeyboard so it uses the new config?

    I can build and run the example from the command line:

    cd Examples/Qt-5.10.0/virtualkeyboard/basic
    /sw/bin/qt/5.10.0/gcc_64/bin/qmake "CONFIG+=lang-all"
    make "CONFIG+=lang-all"
    ./basic
    

    ...but the language switcher is still disabled. I think it's because again, I need to rebuild the virtualkeyboard plugin and not just the example.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TorKlingberg
      wrote on last edited by
      #2

      Update: I got a lot further.

      cd qt/5.10.0/Src/qtvirtualkeyboard/src/virtualkeyboard
      /sw/bin/qt/5.10.0/gcc_64/bin/qmake CONFIG+="lang-all" && make && make install
      

      It will give errors like Library 'pinyin' is not defined.

      cd qt/5.10.0/Src/qtvirtualkeyboard/src/virtualkeyboard/3rdparty/openwnn
      /sw/bin/qt/5.10.0/gcc_64/bin/qmake && make
      

      Same for pinyin, tcime, then go back and build virtualkeyboard.

      The example basic doesn't need to be rebuilt, just run it. I guess qtvirtualkeyboard is dynamically linked. Unclear how it knows where it load it from.

      Now language switcher is enabled, and I can scroll through a long list of languages! I wish I knew how to do all this inside QtCreator though.

      Languages like Japanese that need an IME are still broken. When I pick it, there is an error:

      qml: Qt.createQmlObject(): failed to create object: 
          qrc:/QtQuick/VirtualKeyboard/content/layouts/ja_JP/japaneseInputMethod:1:57: JapaneseInputMethod is not a type
      

      Somehow openwnn is still not loaded correctly. Any ideas?

      1 Reply Last reply
      0
      • michaelLM Offline
        michaelLM Offline
        michaelL
        wrote on last edited by
        #3

        Hi Torklingberg,

        could you get it to work.
        I have the same issue.

        ODБOïO 1 Reply Last reply
        0
        • michaelLM michaelL

          Hi Torklingberg,

          could you get it to work.
          I have the same issue.

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #4

          @michaelL hi,

          you should use '@username' if not, the person will proably not recive notification

          1 Reply Last reply
          0
          • michaelLM Offline
            michaelLM Offline
            michaelL
            wrote on last edited by
            #5

            @TorKlingberg DId you get it to work?

            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