Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Quick application that dynamically loads Qt Quick plugins - QML dependencies
Forum Update on Monday, May 27th 2025

Qt Quick application that dynamically loads Qt Quick plugins - QML dependencies

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 603 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.
  • V Offline
    V Offline
    VRHans
    wrote on 24 Jan 2017, 02:07 last edited by
    #1

    I've got a Qt quick application that I run windeployqt against to produce the dependencies for the application. This works great.

    This application dynamically loads plugins (SO/DYLIB/DLL) on a given platform, instantiates those plugins and carries on.

    This works fine except when the plugin itself tries to instantiate QML I get missing import errors such as:

    ERROR: MyApp::log [plugin message] MyPlugin::activate -> qrc:/30046D46
    -C622-47DE-B446-B984310542C8/qmlresources/MyQml.qml:3:1: module "QtQuick.Co
    ntrols" is not installed

    ERROR: MyApp::log [plugin message] MyPlugin::activate -> qrc:/30046D46
    -C622-47DE-B446-B984310542C8/qmlresources/MyQml.qml:4:1: module "QtQuick.Layouts" is not installed

    Each of my plugins has an activate method that tells it to load its Qml, and I quite clearly have failed to structure my runtime dependencies properly. The long GUID string is purely to avoid resource collisions between plugins I don't control.

    My question is - should I be running windeployqt against the plugin and installing those dependencies relative to the location of the plugin?

    Where should the Qml dependencies of the plugin be installed - with the hosting application's Qml dependencies - or in some location relative to the location of the plugin SO/DYLIB/DLL?

    Thanks :)

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRHans
      wrote on 24 Jan 2017, 13:38 last edited by
      #2

      I have temporarily sidestepped this by deploying ALL of Qml's runtime dependencies with my hosting application.

      I wonder if adding a path dynamically for Qt to search for Qml dependencies would work...? If I could have the plugin add that when it is instantiated - that would be great.

      1 Reply Last reply
      0

      1/2

      24 Jan 2017, 02:07

      • Login

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