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. Plugin Load Problem
Qt 6.11 is out! See what's new in the release blog

Plugin Load Problem

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

    I'm development a software that need to load a lib("libmacdocktile.dylib") to show text in dock icon, imitating cocoa behavior.

    @QPluginLoader* loader = new QPluginLoader(plugins.at(i));
    QObject *o = loader->instance();
    @
    plugins.at(i) denote the absolute path of the lib
    (it's /Users/patricklee/space/uHub/uHub/uHub.app/Contents/MacOS/docktile/libmacdocktile.dylib in my dev environment).

    When I run it in Qt, it works fine and successfully loaded to o.
    But when I run outside,
    change to /Users/patricklee/space/uHub/uHub/, and open uHub.app, or
    change to /Users/patricklee/space/uHub/uHub/uHub.app/Contents/MacOS, and open uhub,
    the lib doesn't load and return 0x00 to o.

    How to make it work outside qt?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rigid
      wrote on last edited by
      #2

      any one could help?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        How do you find the absolute path? Is it correct?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rigid
          wrote on last edited by
          #4

          I place the lib in the ***.app/Contents/MacOS/,
          it's absolutely correct because I can run in the Qt.

          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