Results 1 to 2 of 2

Thread: QML plugin installation

  1. #1
    Join Date
    Dec 2010
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default QML plugin installation

    Hello,

    I have made a very simple QML plugin following the chapter 6 tutorial which compiles fine, but I am not able to use it in my Symbian application.
    Here is my folder structure:

    Qt Code:
    1. \myApp
    2. myApp.pro
    3. \qml
    4. main.qml
    5. myPlugin
    6. myPlugin.pro
    7. myPlugin.cpp
    8. myPlugin.h
    To copy to clipboard, switch view to plain text mode 

    After plugin compilation for device and simulator using QtCreator I have :

    Qt Code:
    1. \myApp
    2. myApp.pro
    3. \qml
    4. main.qml
    5. \myPlugin
    6. myPlugin.pro
    7. myPlugin.cpp
    8. myPlugin.h
    9. \myPlugin-build-simulator
    10. qmldir
    11. \debug
    12. libmyPlugin.a
    13. myPlugin.dll
    14. \release
    15. libmyPlugin.a
    16. myPlugin.dll
    17. \myPlugin-build-symbian
    18. qmldir
    19. \debug
    20. libmyPlugin.a
    21. myPlugin.dll
    22. \release
    23. libmyPlugin.a
    24. myPlugin.dll
    To copy to clipboard, switch view to plain text mode 

    main.qml
    Qt Code:
    1. import myPlugin 1.0
    2. //...
    To copy to clipboard, switch view to plain text mode 

    qmldir
    Qt Code:
    1. plugin myPlugin
    To copy to clipboard, switch view to plain text mode 

    myPlugin.pro (generated by QtCreator, left untouched)
    Qt Code:
    1. TEMPLATE = lib
    2. TARGET = myPlugin
    3. QT += declarative
    4. CONFIG += qt plugin
    5.  
    6. TARGET = $$qtLibraryTarget($$TARGET)
    7. uri = myPlugin
    8.  
    9. # Input
    10. SOURCES += \
    11. myPlugin_plugin.cpp \
    12. myPlugin.cpp
    13.  
    14. HEADERS += \
    15. myPlugin.h \
    16. myPlugin_plugin.h
    17.  
    18. OTHER_FILES = qmldir
    19.  
    20. !equals(_PRO_FILE_PWD_, $$OUT_PWD) {
    21. copy_qmldir.target = $$OUT_PWD/qmldir
    22. copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
    23. copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
    24. QMAKE_EXTRA_TARGETS += copy_qmldir
    25. PRE_TARGETDEPS += $$copy_qmldir.target
    26. }
    27.  
    28. qmldir.files = qmldir
    29. symbian {
    30. TARGET.EPOCALLOWDLLDATA = 1
    31. } else:unix {
    32. maemo5 | !isEmpty(MEEGO_VERSION_MAJOR) {
    33. installPath = /usr/lib/qt4/imports/$$replace(uri, \\., /)
    34. } else {
    35. installPath = $$[QT_INSTALL_IMPORTS]/$$replace(uri, \\., /)
    36. }
    37. qmldir.path = $$installPath
    38. target.path = $$installPath
    39. INSTALLS += target qmldir
    40. }
    To copy to clipboard, switch view to plain text mode 

    The code for the plugin is similar to the tutorial : http://doc.qt.nokia.com/4.7-snapshot...6-plugins.html

    I got the error "myPlugin module not installed"

    How can I install the plugin to my app ?

    Thanks

  2. #2
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: QML plugin installation

    http://www.qtcentre.org/threads/4451...ot-find-a-type

    this is the thread I had started...
    I already managed to solve my issue using tips I was given...maybe it will help you as well
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

Similar Threads

  1. Replies: 7
    Last Post: 11th April 2013, 11:55
  2. Replies: 0
    Last Post: 15th March 2011, 19:27
  3. Replies: 1
    Last Post: 8th October 2010, 12:38
  4. Plugin and shared class between plugin and application
    By wishper in forum Qt Programming
    Replies: 7
    Last Post: 23rd August 2010, 18:00
  5. Replies: 0
    Last Post: 16th September 2009, 03:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.