跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. Mobile and Embedded
  4. Keyboard layout switching in Qt, not just in Qt for embedded Linux
Forum Updated to NodeBB v4.3 + New Features

Keyboard layout switching in Qt, not just in Qt for embedded Linux

已排程 已置頂 已鎖定 已移動 Mobile and Embedded
38 貼文 2 Posters 13.4k 瀏覽 1 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • SGaistS 離線
    SGaistS 離線
    SGaist
    Lifetime Qt Champion
    寫於 最後由 編輯
    #19

    So all in all quick version: -> kernel -> busybox -> Qt Application ?

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

    1 條回覆 最後回覆
    0
    • _ 離線
      _ 離線
      __Alex__
      寫於 最後由 編輯
      #20

      Yes, that's right.

      1 條回覆 最後回覆
      0
      • SGaistS 離線
        SGaistS 離線
        SGaist
        Lifetime Qt Champion
        寫於 最後由 編輯
        #21

        Well, then Qt for Embedded Linux is the only option. Why did you want to use it in the first place ?

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

        1 條回覆 最後回覆
        0
        • _ 離線
          _ 離線
          __Alex__
          寫於 最後由 編輯
          #22

          Ok, we'll try that.

          Assuming you were asking: "Why did you not want to use it in the first place ?"
          Well, the project has been running for a few years now, requirements kept changing and keyboard layout switching was added to the specification just recently.

          I have a question about the tutorial on http://doc.qt.digia.com/4.6/qt-embedded-install.html:
          How do I switch between my two Qt versions? I use Qt Simulator for simulations and when compiling our stuff on the hardware, we use a makefile without QtCreator. Do I only have to change $PATH?
          If possible I'd like to keep the code working for both versions by using a #compileflag

          1 條回覆 最後回覆
          0
          • SGaistS 離線
            SGaistS 離線
            SGaist
            Lifetime Qt Champion
            寫於 最後由 編輯
            #23

            Indeed, the was a word missing :D

            Just create one kit for each Qt version and use both for you project, then you can switch at will from Qt Creator

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

            1 條回覆 最後回覆
            0
            • _ 離線
              _ 離線
              __Alex__
              寫於 最後由 編輯
              #24

              Ok, but how? Is it enough to choose the corresponding qmake in the "Build Settings/General/Qt Version/Manage"? Qt Simulator doesn't allow me to change that one.

              And if I run a shell-script to compile everything together for the hardware, how does the system know which Qt to use if I change it only in QtCreator?

              1 條回覆 最後回覆
              0
              • SGaistS 離線
                SGaistS 離線
                SGaist
                Lifetime Qt Champion
                寫於 最後由 編輯
                #25

                Wait, Qt Simulator ? The one from the Nokia time ?

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

                1 條回覆 最後回覆
                0
                • _ 離線
                  _ 離線
                  __Alex__
                  寫於 最後由 編輯
                  #26

                  Yes, that one, but I can compile it in Desktop mode, too, if I have to. Qt simulator has the advantage of not being fullscreen (because it provides its own virtual screen), so I've used it until now. Though I don't mind abandoning it if it means getting those accursed keyboard layouts to work.

                  But just switching qmake doesn't make a difference. I followed the tutorial on http://doc.qt.digia.com/4.6/qt-embedded-install.html (but didn't setup the virtual frame buffer), so I'd expect that at least "QKbdDriverFactory::create" shouldn't be an undefined reference anymore. I know that I still need to do some other things to get it to run, like finding out where the QApplication object is that needs to be constructed with the QApplication::GuiServer type, but that shouldn't matter for the compiler, right?

                  1 條回覆 最後回覆
                  0
                  • SGaistS 離線
                    SGaistS 離線
                    SGaist
                    Lifetime Qt Champion
                    寫於 最後由 編輯
                    #27

                    Indeed.

                    What I do when I have to develop for embedded is to build an embedded version for x86 that uses QVFB so I have the same set of libraries than the version from my target.

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

                    1 條回覆 最後回覆
                    0
                    • _ 離線
                      _ 離線
                      __Alex__
                      寫於 最後由 編輯
                      #28

                      But even if I don't have the virtual frame buffer, the compiler should compile everything. But still the factory can't be found.

                      Do I really only need to switch the qmake in the project settings?

                      1 條回覆 最後回覆
                      0
                      • SGaistS 離線
                        SGaistS 離線
                        SGaist
                        Lifetime Qt Champion
                        寫於 最後由 編輯
                        #29

                        Are you sure you are doing an x86 embedded build ?

                        If you are using Qt Creator, just switch from one kit to another one. Or if from the command line, use the correct qmake version.

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

                        1 條回覆 最後回覆
                        0
                        • _ 離線
                          _ 離線
                          __Alex__
                          寫於 最後由 編輯
                          #30

                          I am not sure, that's why I'm asking if switching the qmake is enough or if more things are needed to make QtCreator use the other kit.

                          1 條回覆 最後回覆
                          0
                          • _ 離線
                            _ 離線
                            __Alex__
                            寫於 最後由 編輯
                            #31

                            I am going to be on holidays for the next 3 weeks. Thanks for the help so far!

                            Afterwards I will probably try to setup a new VM, install only Qt for Embedded Linux and see if it works better.

                            1 條回覆 最後回覆
                            0
                            • SGaistS 離線
                              SGaistS 離線
                              SGaist
                              Lifetime Qt Champion
                              寫於 最後由 編輯
                              #32

                              The simplest way on the command line is to give the full path to the qmake corresponding to which version of Qt you want to compile with.

                              On Qt Creator, you have to check your kits.

                              Have a nice time

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

                              1 條回覆 最後回覆
                              0
                              • _ 離線
                                _ 離線
                                __Alex__
                                寫於 最後由 編輯
                                #33

                                Hello again,

                                I had a nice time indeed. I hope you're doing well, too.

                                I finally tried to tackle Qt for Embedded Linux again, but I got another problem:
                                I set up a new VM and installed only Qt for Embedded Linux SDK. When I found out that this SDK doesn't include QtCreator, I installed QtCreator version 3.2.1. Now I have the problem that it doesn't find any kits. I assumed when you install an SDK it would be registered in a place where QtCreator could find it, but apparently just extending PATH doesn't do the trick.

                                Do I have to add it manually? I tried that, too, but the SDK doesn't have a GCC. I tried using RCC instead, but QtCreator says that this one is not able to compile the project. And unfortunately there doesn't seem to be a tutorial on that here. so I'd like to know

                                1. how to properly register the SDK so QtCreator sees it and
                                2. if that's not possible, how to link a kit manually

                                Cheers
                                Alex

                                1 條回覆 最後回覆
                                0
                                • _ 離線
                                  _ 離線
                                  __Alex__
                                  寫於 最後由 編輯
                                  #34

                                  Also the SDK we're currently using for compiling (a custom-made arm SDK) has some functionality that's required as well, so if I switch all paths in our compile-scripts to the Qt for Embedded Linux SDK I get the error
                                  "configure: error: C compiler cannot create executables"

                                  So apparently I need some functionality from the current SDK, too. I guess that means I'd have to merge both SDKs, right? Is something like that even doable? I mean, obviously it's possible to customize an SDK, but the Qt for Embedded Linux one seems to be the only one capable of keyboard layout switching, so I'm expecting massive compatibility problems.

                                  1 條回覆 最後回覆
                                  0
                                  • SGaistS 離線
                                    SGaistS 離線
                                    SGaist
                                    Lifetime Qt Champion
                                    寫於 最後由 編輯
                                    #35

                                    You are mixing several things.

                                    To register a new version of Qt with Qt Creator you have to go the Build & Run panel of the Preferences, Qt Version and add it there. Qt doesn't provide gcc (or rather g++) you have to install these using your linux distribution package manager.

                                    Did you already cross-compiled Qt for arm ?

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

                                    1 條回覆 最後回覆
                                    0
                                    • _ 離線
                                      _ 離線
                                      __Alex__
                                      寫於 最後由 編輯
                                      #36

                                      Yes, we've been cross-compiling the project for arm for quite some time now, but instead of QtCreator we use sh-scripts that call makefiles for that. QtCreator was used for simulation only.

                                      Incidentally I found out that "QKbdDriverFactory::create" throws its error only inside of QtCreator. When using the sh-scripts it compiles fine, even though as far as I can tell we're referencing the same SDK in both cases. Of course switching layouts doesn't work yet because I just tested invoking the create-function so far and I can't tell if it will work at all. Is there a working example somewhere? I've been searching for some time now, but to no avail. I do know roughly what to do but without an example I'd have to guess around a lot, without knowing if our custom SDK (and our current software architecture) can do it at all.

                                      About QtCreator:
                                      That problem is fairly minor now because if I switch to embedded SDK, some other arm-related things are missing, but thanks for the help. After going back to our original version of QtCreator (2.4.1) the Qt Kit tab is fortunately gone (so no more manually configuring a kit), so I did what you told me and now the kit is there, but in the SDK's qdeclarativeitem.h it doesn't like Q_REVISION. But since this is likely a dead-end unless I find out how to merge both SDKs this issue is not important anymore.

                                      And one more question:
                                      Can Qt for Embedded Linux SDK handle special things like when you're in Chinese and you type a bunch of characters they get combined into fewer characters? When I searched around for alternative solutions to using the embedded SDK and I read that xkbcommon can not do that I started wondering if the SDK can do it.
                                      http://fooishbar.org/tell-me-about/xkbcommon-intro/

                                      1 條回覆 最後回覆
                                      0
                                      • SGaistS 離線
                                        SGaistS 離線
                                        SGaist
                                        Lifetime Qt Champion
                                        寫於 最後由 編輯
                                        #37

                                        Are you trying to build Qt from Qt Creator ?

                                        Kanji handling ? I don't know at all, the subject always intrigued me but I didn't take the time to investigate that.

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

                                        1 條回覆 最後回覆
                                        0
                                        • _ 離線
                                          _ 離線
                                          __Alex__
                                          寫於 最後由 編輯
                                          #38

                                          Building Qt from Qt Creator? No, we installed a Qt SDK that included Qt Creator.

                                          So, do you know of a working example? The examples on http://doc.qt.digia.com/4.6/examples-embeddedlinux.html don't have anything to do with keyboard layouts. I could test Kanji handling there.

                                          1 條回覆 最後回覆
                                          0

                                          • 登入

                                          • Login or register to search.
                                          • 第一個貼文
                                            最後的貼文
                                          0
                                          • 版面
                                          • 最新
                                          • 標籤
                                          • 熱門
                                          • 使用者
                                          • 群組
                                          • 搜尋
                                          • Get Qt Extensions
                                          • Unsolved