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] Extension plugin
QtWS25 Last Chance

[Solved] Extension plugin

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

    I just tried to run the "chapter6-plugins" and the "plugins" declarative examples.

    I could build both of them, now I've got the dll, exp, lib and pdb files in com/nokia/TimeExample and the lib folders.
    I haven't changed the C++ or QML code of the examples.

    When I try to run the chapter6-plugins example, I get the error:
    @
    file:///C:/Qt/Qt-4.8/examples/declarative/tutorials/extending/chapter6-plugins/app.qml:45:5: PieChart is not a type
    PieChart {
    ^
    @
    and for the plugins example:
    @
    file:///C:/Qt/Qt-4.8/examples/declarative/cppextensions/plugins/plugins.qml:41:1: module "com.nokia.TimeExample" is not installed
    import com.nokia.TimeExample 1.0 // import types from the plugin
    ^
    @

    I have created a vcproj file, so I built everything in Visual Studio and I opened the qmlproject file in Qt Creator.

    Can someone tell me what I've done wrong?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blam
      wrote on last edited by
      #2

      It sounds like Qt Creator isn't finding the plugin library. If you are running qmlviewer you can pass the import path with the -I option to give it the current directory:

      qmlviewer -I . plugins.qml
      

      Otherwise from Qt Creator you could set the QML_IMPORT_PATH environment variable. (From C++ apps you can also set it using QDeclarativeEngine::setImportPathList().)

      1 Reply Last reply
      1
      • E Offline
        E Offline
        ephe
        wrote on last edited by
        #3

        Thank you, I thought that the current directory is included in the import path. That was exactly my problem!

        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