[solved] custom QML extension plugin



  • 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.



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



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



  • 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@



  • 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?



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.