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. Windows - qt_add_qml_module failed to load the plugin
Forum Updated to NodeBB v4.3 + New Features

Windows - qt_add_qml_module failed to load the plugin

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 287 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.
  • dheerendraD Offline
    dheerendraD Offline
    dheerendra
    Qt Champions 2022
    wrote on last edited by
    #1

    Hi All

    Unable to load the plugin created using qt_add_qml_module
    CMake on Windows , Qt 6.6.3, Mingw_64.
    Creating the library & adding new qml module using
    qt_add_qml_module(..)

    This creates the plugin.

    However when I import in QML, it is unable to load the plugin.
    I tried to load the plugin using QPluginLoader. This also fails.

    Same CMake configuration works on Linux without any change.

    Anyone facing similar issue ?

    Dheerendra
    @Community Service
    Certified Qt Specialist
    http://www.pthinks.com

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Here is the answer - qt_add_qml_module builds plugin & one shared library. Both have to be in path. I tried to add the path using the addLibraryPath. Adding the path using addLibraryPath did not help. Finally I modified the path environment variable. It started working.

      1. May be bug with addLibraryPath. Need to file a bug on this.
      2. add the path of the shared library & plugin to environment variable. It works.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • dheerendraD dheerendra has marked this topic as solved on

      • Login

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