How to tell Designer to look for runtime dependencies in the folder of the plugin?

  • For our application we have a bunch of custom widgets, we are combined into a single Designer plugin, such that we can use these custom widgets directly in the designer. Our CMake-based build infrastructure is capable of deploying that plugin (we're on Windows, so a .dll) into the QT_PLUGIN_PATH folder. This works very nicely, except for runtime dependencies of the dll.

    I was expecting that if the Designer found a plugin in a certain folder, it would also look for runtime dependencies in that same folder. It doesn't seem to do that, and I can't find any documentation about how to configure Designer to do that.

    One obvious work-around would be to add the plugin path to the PATH environment variable, but it seems more logical that the Designer (in effect probably QPluginLoader or QLibrary) would take care of this, much like the containing folder of any given executable in Windows is also automatically first looked for runtime dependencies. Can I achieve that somehow?

  • Lifetime Qt Champion


    Are you doing a "monolithic" plugin build ? i.e. the plugin is also the dll that your application needs to run ?

  • @SGaist Thanx for thinking with me. I'm not entirely sure what you mean though. The plugin indeed is a dll, that we want to be loaded by Designer. However, we directly instantiate the classes in the dll in our application. Our application does not load it as a plugin.

    Nevertheless, the build infrastructure for our application deploys all runtime dependencies into a single folder, from which we can run/test and create an installer. For the Designer however, such a thing doesn't work, because that would imply copying our application-specific runtimes into the installation folder of Qt

  • Lifetime Qt Champion

    I was thinking about the Splitting Up The Plugin which is the way to go when building an application using your custom designer plugin.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.