Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to include plugin
Forum Updated to NodeBB v4.3 + New Features

How to include plugin

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 882 Views 1 Watching
  • 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
    Ever
    wrote on 13 Dec 2013, 12:28 last edited by
    #1

    Hello Qt community.

    I build echoplugin example and get echoplugin.dll.

    Now I'm trying to use plugin from new application.
    How to include plugin in new application?

    The roots of education are bitter, but the fruit is sweet.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pascom
      wrote on 19 Dec 2013, 18:07 last edited by
      #2

      Hello,
      You should use QPluginLoader (with Qt 4, in don't know yet in Qt5) pass the library file to the constructor or to setFileName() and then call instance().
      If you did all this then you can use the object you got as a normal object and call its methods (and even meta-methods)
      Hope this is detailed enough to help you.
      Pascom

      --
      PasCom

      In a world without walls and fences, who needs Gates and Windows?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        raven-worx
        Moderators
        wrote on 20 Dec 2013, 07:29 last edited by
        #3

        you may want to read "this":http://qt-project.org/doc/qt-4.8/plugins-howto.html for a better understanding.

        Also what would be good to know is:
        Do you want to use it as plugin? Meaning to load it automatically only if it's present in the system? And if it's not present you jsut miss the functionality in your applciation. If so you should use QPluginLoader or QLibrary (if it contains C-exportetd symbols).

        If you want to make it an dependency of your application (something your application can't run without it) you would need to link to the library. Then read "this":http://qt-project.org/wiki/How_to_create_a_library_with_Qt_and_use_it_in_an_application.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0

        3/3

        20 Dec 2013, 07:29

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved