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. How to deal with Qt Quick 2 Extension Plugin inside Project Dir?
Forum Updated to NodeBB v4.3 + New Features

How to deal with Qt Quick 2 Extension Plugin inside Project Dir?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 217 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.
  • K Offline
    K Offline
    kangherr
    wrote on last edited by
    #1

    When I run the project, just stuck on

    qrc:/main.qml:4:1: module "com.mycompany.qmlcomponents" is not installed
    

    But during coding, the Qt creator has recognized the plugin and just fine to import.

    here the trace of import plugins:

    QML debugging is enabled. Only use this in a safe environment.
    QQmlImportDatabase::addImportPath: "/opt/Qt5.14.2/5.14.2/gcc_64/qml"
    QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports"
    QQmlImportDatabase::addImportPath: "/home/linux/Projects/Project_TryPlugin/SourceCode/build-TryPlugin-Desktop_Qt_5_14_2_GCC_64bit-Debug/src/TryPlugin"
    QQmlImportDatabase::addImportPath: "/home/linux/Projects/Project_TryPlugin/SourceCode/build-TryPlugin-Desktop_Qt_5_14_2_GCC_64bit-Debug/src/MyPlugin"
    QQmlImports(qrc:/main.qml)::addLibraryImport: "QtQuick" 2.12 as ""
    QQmlImports(qrc:/main.qml)::importExtension: loaded "/opt/Qt5.14.2/5.14.2/gcc_64/qml/QtQuick.2/qmldir"
    QQmlImportDatabase::registerPluginTypes: "QtQuick" from "/opt/Qt5.14.2/5.14.2/gcc_64/qml/QtQuick.2"
    QQmlImports(qrc:/main.qml)::addLibraryImport: "QtQuick.Window" 2.12 as ""
    QQmlImports(qrc:/main.qml)::importExtension: loaded "/opt/Qt5.14.2/5.14.2/gcc_64/qml/QtQuick/Window.2/qmldir"
    QQmlImportDatabase::registerPluginTypes: "QtQuick.Window" from "/opt/Qt5.14.2/5.14.2/gcc_64/qml/QtQuick/Window.2"
    QQmlImports(qrc:/main.qml)::addLibraryImport: "com.mycompany.qmlcomponents" 1.0 as ""
    QQmlApplicationEngine failed to load component
    qrc:/main.qml:4:1: module "com.mycompany.qmlcomponents" is not installed
    

    Here the complete source code:
    https://github.com/mangherr769/QtWithQml2ExtensionPlugin

    Does anyone know how to resolve this and make it correctly running on cross-platform?

    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