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. Can I build qt plugin & load it in qt application?
QtWS25 Last Chance

Can I build qt plugin & load it in qt application?

Scheduled Pinned Locked Moved Unsolved General and Desktop
dlldynamic libplugin
4 Posts 3 Posters 661 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.
  • D Offline
    D Offline
    Dariusz
    wrote on last edited by
    #1

    Hey
    I want to build a dll plugin for application that runs Qt framework but is not allowing for plugins... They have no SDK. I wonder if there is a way to build qt dll that could be loaded if placed in right place? I want to spawn a server/call local python functions. I have access to python in that app.

    Any idea if any kind of hot-wireing dll like that is possible?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean that kind of plugin ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • D Offline
        D Offline
        Dariusz
        wrote on last edited by
        #3

        Not sure... something that if I Copy in to root directory, qt would automatically load as Qt plugin and execute... ? Hmmmmmmm

        mrjjM 1 Reply Last reply
        0
        • D Dariusz

          Not sure... something that if I Copy in to root directory, qt would automatically load as Qt plugin and execute... ? Hmmmmmmm

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Dariusz

          Hi
          Yes you can.
          see this example (and reads the docs SGaist links)

          https://doc.qt.io/qt-6/qtwidgets-tools-plugandpaint-app-example.html

          Here the drawing app is extended with extra plugsins.

          Do note, however, that you will need to do as sample does in
          "The next step is to load dynamic plugins"

          where is enumerate the files in a given folder using

           const auto entryList = pluginsDir.entryList(QDir::Files);
              for (const QString &fileName : entryList) {
                  QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
          ...
          

          so its not 100% automatic but almost ;)

          1 Reply Last reply
          1

          • Login

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