How to install plugin qmlcanvas?



  • Hi!
    I would like to add the plugin qmlcanvas (http://qt.gitorious.org/qt-labs/qmlcanvas) to my project. I have downloaded the source code by git://gitorious.org/qt-labs/qmlcanvas.git and I have compiled it. This generates the lib libcanvasplugin.so.....now how can I add this plugin to my project?
    I tried to copy the lib libcanvasplugin.so into my LD_LIBRARY_PATH but when I write "import Canvas" in my qml file it doesn´t find it.
    I use OS Ubuntu 10 with Qt Creator 2.3.0.
    Thanks for your help!
    Regards


  • Moderators

    Try adding it to your .pro file, too (In Qt Creator, open .pro and right-click inside the editor, then - if I remember well - Add library).

    But, it can also be the case that the rest of the set up is not adequate (QML Canvas is new and in labs, it may have some special requirements, like building against 4.8 or 5.0).



  • I did add qmlcanvas as an external library to my .pro file resulting in these entries:

    @
    unix:!macx:!symbian: LIBS += -L$$PWD/../qt-labs-qmlcanvas/Canvas/ -lcanvasplugin

    INCLUDEPATH += $$PWD/../qt-labs-qmlcanvas/Canvas
    DEPENDPATH += $$PWD/../qt-labs-qmlcanvas/Canvas
    @

    but the Canvas element still shows up as unknown in qt creator. Do I have to add an import line to my qml file, did you manage to use this plugin at the end?

    [EDIT: code formatting, please wrap in @-tags, Volker]


Log in to reply
 

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