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. [solved] custom QML extension plugin
QtWS25 Last Chance

[solved] custom QML extension plugin

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 2.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.
  • D Offline
    D Offline
    daljit97
    wrote on last edited by
    #1

    Hello, I've some problems with a custom QML extension plugin. Now, I did the following steps:
    File>New>Custom QML Extension plugin> I've created the plugin.
    Now I don't know what to do, how can I use this plugin with another project?
    Thanks.

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

      Link to your plugin library and import it in QML of your app.

      Oleg

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

        Yes, but how?? (I'm a beginner of QT)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          deimos
          wrote on last edited by
          #4

          After

          @qmake
          make@

          you have to

          @make install@

          it will be installed in QTDIR/plugin[something] didn't remember well. Then you will be able to import your plugin in QML as:

          @import com.yourPluginName 1.0@

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

            Thanks for the help. But I've never use qmake commands before, i've seen the documentation but don't understand it. Can you please explain how to use? I have to write those lines in the .pro file?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              deimos
              wrote on last edited by
              #6

              Well, you can build your plugin within Qt Creator. Then just go to the directory where you stored the .pro file and run make install (or nmake install if you use windows).
              qmake and make commands should be run in console (in windows there is an entry in start menu called something like "Qt command prompt").
              Another way could be to add a build step in Qt Creator, so every time you build, it will also be reinstalled.

              regards

              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