Create a "Identified Module" does not work



  • 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?


Log in to reply
 

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