Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Example of Virtual Keyboard showing in different languages
Forum Updated to NodeBB v4.3 + New Features

Example of Virtual Keyboard showing in different languages

Scheduled Pinned Locked Moved Unsolved General and Desktop
55 Posts 7 Posters 26.6k Views 5 Watching
  • 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.
  • Pradeep KumarP Pradeep Kumar

    Install means?. its a plugin, need ti install plugin to the other basic.pro

    path : Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\examples\virtualkeyboard\basic is app to run.
    ?????????????????

    Thanks,

    D Offline
    D Offline
    Devopia53
    wrote on last edited by Devopia53
    #12

    @Pradeep-Kumar

    I assume you are using Windows & minGW.
    Try the following procedure.

    1. Open the Command window (aka Qt 5.8 for Desktop...)
    2. Move to the plugin dir. (cd Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src/virtualkeyboard)
    3. Add the "CONFIG += lang-fi_FI" in virtualkeyboard.pro and save.
    4. Run qmake
    5. Run mingw32-make
    6. Run mingw32-make install
    7. Rebuild your exampls and run.
    Pradeep KumarP 2 Replies Last reply
    2
    • Pradeep KumarP Offline
      Pradeep KumarP Offline
      Pradeep Kumar
      wrote on last edited by
      #13

      i followed the steps in command prompt as u mentioned , i git the button enabled and the respective keyboard in Finnish i guess, please find the link below of the screenshot,

      https://postimg.org/image/xfcbfbmmp/

      Thanks man,

      So now i will try for all the languages,

      Thanks,

      Pradeep Kumar
      Qt,QML Developer

      1 Reply Last reply
      2
      • Pradeep KumarP Offline
        Pradeep KumarP Offline
        Pradeep Kumar
        wrote on last edited by
        #14

        Hi ,

        I tried arabic by changing in .pro, CONFIG+=lang-ar_AR,
        and chinese using CONFIG+=lang-zh_TW,

        below is the link of the screenshot of chinese keyboard,

        https://postimg.org/image/5br02a6tl/,

        but for lang-zh_CN, i didnt get the keyboard in chinese, any specific reason?.

        Thanks,

        Pradeep Kumar
        Qt,QML Developer

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #15

          Just a wild guess but do you have any fonts that supports these characters ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Pradeep KumarP Offline
            Pradeep KumarP Offline
            Pradeep Kumar
            wrote on last edited by Pradeep Kumar
            #16

            Nope, do we need to install in some respective path?.

            Thanks,

            Pradeep Kumar
            Qt,QML Developer

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #17

              In your target font folder AFAIK.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                Devopia53
                wrote on last edited by Devopia53
                #18

                I don't think it's installed font problem.
                Also i don't know PinyinInputMethod( lang-zh_CN), TCInputMethod(lang-zh_TW) and chinese languages.
                But, there are difference between the two features provided by QtVirtualKeyboard.
                Please compare the two source codes below.
                I think the layout for zh_CN is strange.

                Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src\virtualkeyboard\content\layouts\zh_CN\main.qml

                Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src\virtualkeyboard\content\layouts\zh_TW\main.qml

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  alex66955
                  wrote on last edited by
                  #19

                  Hi,

                  I have question regarding the virtual keyboard topic mentioned before and especially for the chinese one. How can I get the upper frame of the keyboard layout for the additional chinese letters.
                  Is it just a word prediction with hunspell or is it an independent mechanism to show additional letters depending on the current selected one?

                  I tried the virtual keyboard example with all languages. But with simplified chinese I have only normal alpha numeric letters like at the official QT link. But they can chose a chinese letter if they typed in some alpha numeric ones.

                  you can see an example here (Pinyin keyboard layout, Zhuyin keyboard layout, Cangjie keyboard layout):

                  • http://blog.qt.io/blog/2016/03/02/qt-virtual-keyboard-updated-with-handwriting-recognition/
                  • https://blog.qt.io/blog/2016/03/02/qt-virtual-keyboard-updated-with-handwriting-recognition/pinyin/
                  1 Reply Last reply
                  0
                  • D Devopia53

                    @Pradeep-Kumar

                    I assume you are using Windows & minGW.
                    Try the following procedure.

                    1. Open the Command window (aka Qt 5.8 for Desktop...)
                    2. Move to the plugin dir. (cd Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src/virtualkeyboard)
                    3. Add the "CONFIG += lang-fi_FI" in virtualkeyboard.pro and save.
                    4. Run qmake
                    5. Run mingw32-make
                    6. Run mingw32-make install
                    7. Rebuild your exampls and run.
                    Pradeep KumarP Offline
                    Pradeep KumarP Offline
                    Pradeep Kumar
                    wrote on last edited by
                    #20

                    @Devopia53

                    again after few days when i try to do the same thing, follow the same steps through command prompt,

                    1 Open the Command window (aka Qt 5.8 for Desktop...)
                    2 Move to the plugin dir. (cd Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src/virtualkeyboard)
                    3 Add the "CONFIG += lang-fi_FI" in virtualkeyboard.pro and save.
                    4 Run qmake
                    5 Run mingw32-make
                    6 Run mingw32-make install
                    7 Rebuild your exampls and run

                    The button is not enabled for respective language. and i am using

                    path : Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\examples\virtualkeyboard\basic is app to run.

                    path : Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src\virtualkeyboard is the plugin to which we need to change and check,

                    any clue what i am doing wrong, few days back i tried it worked, now i dnt know what happened?.

                    Thanks,

                    Pradeep Kumar
                    Qt,QML Developer

                    1 Reply Last reply
                    0
                    • Pradeep KumarP Offline
                      Pradeep KumarP Offline
                      Pradeep Kumar
                      wrote on last edited by
                      #21

                      Hi,

                      Now it is working and i followed the same steps,
                      I dnt know how it worked today and thank u.

                      Thanks,

                      Pradeep Kumar
                      Qt,QML Developer

                      1 Reply Last reply
                      0
                      • D Devopia53

                        @Pradeep-Kumar

                        I assume you are using Windows & minGW.
                        Try the following procedure.

                        1. Open the Command window (aka Qt 5.8 for Desktop...)
                        2. Move to the plugin dir. (cd Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src/virtualkeyboard)
                        3. Add the "CONFIG += lang-fi_FI" in virtualkeyboard.pro and save.
                        4. Run qmake
                        5. Run mingw32-make
                        6. Run mingw32-make install
                        7. Rebuild your exampls and run.
                        Pradeep KumarP Offline
                        Pradeep KumarP Offline
                        Pradeep Kumar
                        wrote on last edited by Pradeep Kumar
                        #22

                        Hi,

                        I assume you are using Windows & minGW.
                        Try the following procedure.

                        1) Open the Command window (aka Qt 5.8 for Desktop...)
                        2) Move to the plugin dir. (cd Qt\Qt5.8\5.8\Src\qtvirtualkeyboard\src/virtualkeyboard)
                        3) Add the "CONFIG += lang-fi_FI" in virtualkeyboard.pro and save.
                        4) Run qmake
                        5) Run mingw32-make
                        6)  Run mingw32-make install
                        7) Rebuild your exampls and run.
                        

                        This works fine for windows,

                        Anyone, who knows the similar commands to run in ubuntu,

                        What are the steps to compile the qt virtual keyboard and run the Qt virtual keyboard in ubuntu.

                        Thanks,

                        Pradeep Kumar
                        Qt,QML Developer

                        1 Reply Last reply
                        0
                        • Pradeep KumarP Offline
                          Pradeep KumarP Offline
                          Pradeep Kumar
                          wrote on last edited by
                          #23

                          require the commands to run in ubuntu,

                          please can anyone provide guidance,

                          Thanks,

                          Pradeep Kumar
                          Qt,QML Developer

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #24

                            Hi,

                            The steps are the same except that your call make rather than mingw32-make.

                            Just ensure you use the full path to your installed Qt's qmake. Otherwise you'll likely use your system provided qmake.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            1
                            • Pradeep KumarP Offline
                              Pradeep KumarP Offline
                              Pradeep Kumar
                              wrote on last edited by Pradeep Kumar
                              #25

                              Hi,

                              I have used the path where virtual keyboard plugin is present

                              /home/user/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard/

                              then used qmake .
                              then used the command make.

                              getting the below error.

                              user@user-Inspiron-3558:~/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard$ make

                              /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_LIBUDEV -DQT_VIRTUALKEYBOARD_DEFAULT_STYLE="default" -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/local/Qt-5.4.0/mkspecs/devices/linux-imx6-g++ -I. -I/u01/rootfs/usr/include -I/u01/rootfs/usr/local/Qt-5.4.0/include -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtQuick -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtGui/5.4.0 -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtGui/5.4.0/QtGui -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtGui -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtQml -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtNetwork -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtCore/5.4.0 -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtCore/5.4.0/QtCore -I/u01/rootfs/usr/local/Qt-5.4.0/include/QtCore -I.moc -I/u01/rootfs/usr/include -o .obj/inputcontext.o inputcontext.cpp

                              inputcontext.cpp: In member function 'void QtVirtualKeyboard::InputContext::setSelectionOnFocusObject(const QPointF&, const QPointF&)':

                              inputcontext.cpp:565:5: error: 'setSelectionOnFocusObject' is not a member of 'QPlatformInputContext'
                              inputcontext.cpp: In member function 'void
                              QtVirtualKeyboard::InputContext::update(Qt::InputMethodQueries)':
                              inputcontext.cpp:655:51: error: 'class QInputMethod' has no member named 'anchorRectangle'
                              inputcontext.cpp:670:66: error: 'ImInputItemClipRectangle' is not a member of 'Qt'
                              inputcontext.cpp:671:59: error: 'ImAnchorRectangle' is not a member of 'Qt'
                              make: *** [.obj/inputcontext.o] Error 1

                              I am using ubuntu 14.04 LTS and Qt version 5.8.

                              Please provide the guidance.

                              Thanks,

                              Pradeep Kumar
                              Qt,QML Developer

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #26

                                Except that your are building against a 5.4.0 version of Qt. Did you use the full path to the qmake from your cross-compiled Qt ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • Pradeep KumarP Offline
                                  Pradeep KumarP Offline
                                  Pradeep Kumar
                                  wrote on last edited by Pradeep Kumar
                                  #27

                                  HI,

                                  now i used like

                                  -Inspiron-3558:~/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard$ /home/user/Qt5.8.0/5.8/gcc_64/bin/qmake

                                  Then ran

                                  -Inspiron-3558:~/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard$ make

                                  Now i am getting below mentioned error.

                                  g++ -c -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_VIRTUALKEYBOARD_DEFAULT_STYLE="default" -DQT_VIRTUALKEYBOARD_DESKTOP -DQT_VIRTUALKEYBOARD_HAVE_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/home/user/Qt5.8.0/5.8/gcc_64/include -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtQuick -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui/5.8.0 -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui/5.8.0/QtGui -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtQml -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtNetwork -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore/5.8.0 -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore/5.8.0/QtCore -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore -I.moc -isystem /usr/include/libdrm -I/home/user/Qt5.8.0/5.8/gcc_64/mkspecs/linux-g++ -o .obj/inputcontext.o inputcontext.cpp

                                  g++: error: unrecognized command line option ‘-std=c++1z’
                                  g++: error: unrecognized command line option ‘-Wdate-time’

                                  make: *** [.obj/inputcontext.o] Error 1

                                  Please help me out.

                                  Thanks,

                                  Pradeep Kumar
                                  Qt,QML Developer

                                  jsulmJ 1 Reply Last reply
                                  0
                                  • Pradeep KumarP Pradeep Kumar

                                    HI,

                                    now i used like

                                    -Inspiron-3558:~/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard$ /home/user/Qt5.8.0/5.8/gcc_64/bin/qmake

                                    Then ran

                                    -Inspiron-3558:~/Qt5.8.0/5.8/Src/qtvirtualkeyboard/src/virtualkeyboard$ make

                                    Now i am getting below mentioned error.

                                    g++ -c -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_VIRTUALKEYBOARD_DEFAULT_STYLE="default" -DQT_VIRTUALKEYBOARD_DESKTOP -DQT_VIRTUALKEYBOARD_HAVE_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/home/user/Qt5.8.0/5.8/gcc_64/include -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtQuick -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui/5.8.0 -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui/5.8.0/QtGui -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtGui -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtQml -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtNetwork -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore/5.8.0 -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore/5.8.0/QtCore -I/home/user/Qt5.8.0/5.8/gcc_64/include/QtCore -I.moc -isystem /usr/include/libdrm -I/home/user/Qt5.8.0/5.8/gcc_64/mkspecs/linux-g++ -o .obj/inputcontext.o inputcontext.cpp

                                    g++: error: unrecognized command line option ‘-std=c++1z’
                                    g++: error: unrecognized command line option ‘-Wdate-time’

                                    make: *** [.obj/inputcontext.o] Error 1

                                    Please help me out.

                                    Thanks,

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #28

                                    @Pradeep-Kumar said in Example of Virtual Keyboard showing in different languages:

                                    Qt5.8.0/5.8/gcc_64/bin/qmake

                                    I thought you want to build for your target device using your cross compiled Qt 5.4? Now you're building for desktop Qt 5.9. What do you want to do?

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0
                                    • Pradeep KumarP Offline
                                      Pradeep KumarP Offline
                                      Pradeep Kumar
                                      wrote on last edited by
                                      #29

                                      Hi,

                                      I want to compile the virtualkeyboard for ubuntu and raspberry pi board as i did for windows,

                                      In windows i was able to compile and get it,
                                      here is the screenshot

                                      https://postimg.org/image/xfcbfbmmp/

                                      So i was trying and getting the errors as mentioned in my earlier post,

                                      So asking guidance,

                                      Thanks,

                                      Pradeep Kumar
                                      Qt,QML Developer

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #30

                                        Like I already wrote: use the full path to the qmake executable matching the version of Qt you want to build the module for.

                                        Also, use out of source builds since you are going to compile for several platforms, that will avoid "polluting" the source tree with build artefacts.

                                        Interested in AI ? www.idiap.ch
                                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        Pradeep KumarP 1 Reply Last reply
                                        1
                                        • SGaistS SGaist

                                          Like I already wrote: use the full path to the qmake executable matching the version of Qt you want to build the module for.

                                          Also, use out of source builds since you are going to compile for several platforms, that will avoid "polluting" the source tree with build artefacts.

                                          Pradeep KumarP Offline
                                          Pradeep KumarP Offline
                                          Pradeep Kumar
                                          wrote on last edited by
                                          #31

                                          @SGaist said in Example of Virtual Keyboard showing in different languages:

                                          Like I already wrote: use the full path to the qmake executable matching the version of Qt you want to build the module for.

                                          Also, use out of source builds since you are going to compile for several platforms, that will avoid "polluting" the source tree with build artefacts.

                                          Use the full path?.

                                          can u explain this well Qt5.8 is installed in home directory i am using fullpath only.
                                          /home/user/Qt5.8.0/5.8/gcc_64/bin/qmake

                                          Thanks,

                                          Pradeep Kumar
                                          Qt,QML Developer

                                          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