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. QT dll question

QT dll question

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.5k 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.
  • M Offline
    M Offline
    maybnxtseasn
    wrote on last edited by
    #1

    If i make a QT dll i have the following 2 questions

    1.) Is there a depedency i will need to install or distribute with my dll in order for the user to load the dll so it can load a window?

    2.) How do i execute the code in the dll? with a simply loadlibrary call?( that is if im on windows )

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Regarding the Qt library DLLs itself: You need to install all DLLs corresponding to the Qt modules you use (QtCore4.dll, QtGui4.dll an probably some more like QtNetwork4.dll or QtXml4.dll).

      Assuming that you build you own DLL to add functionality to something, you will have to distribute that DLL and all DLLs it depends on. So, if you use some Qt code in your DLL, you will have to ship the Qt DLLs too (unless you can be sure that they are installed by the host application already).

      Using the code depends: If you can link against the DLL, you can use it just like the Qt API. If your DLL is supposed to be used by others, then just ship it together with a header file (.h) so that the users can link against the DLL.

      If the DLL is purely optional (linking against a DLL creates a hard dependency), you could build a Qt based plugin. The users then can load the DLL using QPluginLoader. There are some examples in the docs (plug and paint example).

      http://www.catb.org/~esr/faqs/smart-questions.html

      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