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. Create a "Identified Module" does not work
QtWS25 Last Chance

Create a "Identified Module" does not work

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

    I try to create a module with the help of following documentation guide:

    http://qt-project.org/doc/qt-5/qtqml-modules-identifiedmodules.html

    I have created an empty Qt Quick Desktop application with Qt Creator (MyTestApp)

    Qml files are located in sub directory "qml/MyTestApp" (complete path "C:/projects/MyTestApp/qml/MyTestApp").

    This subdirectory contains a file called "OSD.qml". Within this file I want to access files which are located in the next subdirectory "included/imageborder" (complete path "C:/projects/MyTestApp/qml/MyTestApp/included/imageborder"). There is a file called "ImageHighlightBorder.qml".

    I created a qmldir file in this directory with following content:

    @module MyTestApp.qml.MyTestApp.included.imageborder
    ImageHighlightBorder 1.0 ImageHighlightBorder.qml@

    The "MyTestApp.pro" file looks like this:

    @# Add more folders to ship with the application, here
    folder_01.source = qml/MyTestApp
    folder_01.target = qml
    DEPLOYMENTFOLDERS = folder_01

    Additional import path used to resolve QML modules in Creator's code model

    QML_IMPORT_PATH = D:/projekte/qt_quick/MyTestApp

    The .cpp file which was generated for your project. Feel free to hack it.

    SOURCES += main.cpp

    Installation path

    target.path =

    Please do not modify the following two lines. Required for deployment.

    include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
    qtcAddDeployment()@

    I try to import in "OSD.qml"

    import MyTestApp.qml.MyTestApp.included.imageborder 1.0

    When I try to run the project a get following error:

    @file:///D:/projekte/qt_quick/build-MyTestApp-Desktop_Qt_5_2_1_MinGW_32bit-Debug/qml/MyTestApp/OSD.qml:10:1: module "MyTestApp.qml.MyTestApp.included.imageborder" is not installed
    import MyTestApp.qml.MyTestApp.included.imageborder 1.0
    @

    Whats wrong here?

    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