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. Add plugin to QML project
QtWS25 Last Chance

Add plugin to QML project

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 2 Posters 2.0k 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.
  • D Offline
    D Offline
    DavidM29
    wrote on last edited by DavidM29
    #1

    Hello,
    I'm working on a project for an embedded device which does not support recent Qt version. Because of this, it does not handle the Qt VirtualKeyboard.
    In order to solved that I found this code : https://github.com/githubuser0xFFFF/QtFreeVirtualKeyboard
    It seems to be enough for what I need to do but I don't have any ideas on how to add it to my project. I've neved added any external Qt module on a project.
    Does anybody can help me with that ?

    Thank you in advance

    DiracsbracketD 1 Reply Last reply
    0
    • D DavidM29

      Hello,
      I'm working on a project for an embedded device which does not support recent Qt version. Because of this, it does not handle the Qt VirtualKeyboard.
      In order to solved that I found this code : https://github.com/githubuser0xFFFF/QtFreeVirtualKeyboard
      It seems to be enough for what I need to do but I don't have any ideas on how to add it to my project. I've neved added any external Qt module on a project.
      Does anybody can help me with that ?

      Thank you in advance

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by Diracsbracket
      #2

      Hi @DavidM29

      This builds as a Qt plugin as the .pro file is configured with

      CONFIG += plugin
      

      You can find out what to do from looking at the same .pro file:

      deployment.files = *.qml FontAwesome.otf qmldir
      
      deployment.path = $$[QT_INSTALL_QML]/QtQuick/FreeVirtualKeyboard
      target.path = $$[QT_INSTALL_PLUGINS]/platforminputcontexts
      

      After building the plugin as you would any project in Qt Creator, you must copy the files listed in the deployment.files variable (all QML files, the font file and the qmldir file) to

      $$[QT_INSTALL_QML]/QtQuick/FreeVirtualKeyboard
      

      where QT_INSTALL_QML is the QML source code directory for your current kit (e.g. D:\Qt\5.11.0\msvc2017_64\qml)

      The plugin directory for your current kit is e.g: D:/Qt/5.11.0/msvc2017_64/plugins.
      You can get the values of all these QT_ variables by adding a line such as the following in your .pro file:

      message(Plugins: $$[QT_INSTALL_PLUGINS])
      

      and look for it in the General Messages tab in Qt Creator.

      Thus you need to copy the plugin files built (.dll and.lib) to

      $$[QT_INSTALL_PLUGINS]/platforminputcontexts
      

      There are already other files in that dir; just add yours.
      To be complete, you can add both Release and Debug versions of the plugin files in there, adding a suffix d to the filename for the Debug version.

      Once all the files are copied, you can just open the example project included in the rep and it should run (no need to restart Qt for the new plugin). I don't understand though why the above deployment steps are not executed automatically as specified in the .pro file...

      Good luck!

      1 Reply Last reply
      3
      • D Offline
        D Offline
        DavidM29
        wrote on last edited by
        #3

        @Diracsbracket
        If I understand well the VirtualKeyboard is not installed in my project but in my Qt Creator ? Then I have to make sure it deploys as well in my final build ?

        DiracsbracketD 1 Reply Last reply
        0
        • D DavidM29

          @Diracsbracket
          If I understand well the VirtualKeyboard is not installed in my project but in my Qt Creator ? Then I have to make sure it deploys as well in my final build ?

          DiracsbracketD Offline
          DiracsbracketD Offline
          Diracsbracket
          wrote on last edited by Diracsbracket
          #4

          @DavidM29
          How are you currently deploying?

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DavidM29
            wrote on last edited by
            #5

            How can I figure this out ? I'm using a virtual machine with everything provided by the embedded device constructor.
            I know that it is for a Arm platform and a Qt5 version. (This is the answer to your first question that you changed)

            I can use my device by deploying in real time in it. I mean by that that once I build the project I can run it on a Remote linux host which is my embedded device.

            By the way I made some progress in the way to use it I'm now able to run the demo app with the keyboard working.

            DiracsbracketD 1 Reply Last reply
            0
            • D DavidM29

              How can I figure this out ? I'm using a virtual machine with everything provided by the embedded device constructor.
              I know that it is for a Arm platform and a Qt5 version. (This is the answer to your first question that you changed)

              I can use my device by deploying in real time in it. I mean by that that once I build the project I can run it on a Remote linux host which is my embedded device.

              By the way I made some progress in the way to use it I'm now able to run the demo app with the keyboard working.

              DiracsbracketD Offline
              DiracsbracketD Offline
              Diracsbracket
              wrote on last edited by Diracsbracket
              #6

              @DavidM29
              Since it seems you are using the dynamically linked Qt version and that you seem to let Qt Creator do the deployment, the plugin will also be deployedm, along with all the other Qt plugins you are using, I wager.

              Does the example work on the target?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DavidM29
                wrote on last edited by
                #7

                @Diracsbracket
                I haven't tried on the target. I just tried on my windows version of Qt. I'm going to try it on the virtual machine.

                DiracsbracketD 1 Reply Last reply
                0
                • D DavidM29

                  @Diracsbracket
                  I haven't tried on the target. I just tried on my windows version of Qt. I'm going to try it on the virtual machine.

                  DiracsbracketD Offline
                  DiracsbracketD Offline
                  Diracsbracket
                  wrote on last edited by
                  #8

                  @DavidM29
                  Well, since it seems that you are not using any custom deployment steps (i.e. Qt Creator does everythying), then that example should also work on your linux target I guess.

                  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