Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55002

Cannot import directory with qualifier when using a qmldir file

    XMLWordPrintable

Details

    • 7ec1d316f4eefc12b7fe040e467f799a67ce0a11

    Description

      When loading QML files remotely, it is not possible to import a directory with a qualifier when using a qmldir file. The following code will fail:

      main.qml
      import QtQuick 2.0
      import "foo" as Foo
      
      Foo.MyItem { }
      
      foo/my_item.qml
      import QtQuick 2.0
      
      Item { }
      
      foo/qmldir
      MyItem 1.0 my_item.qml
      

      When run with the qml utility I get:

      # qml http://10.126.6.15/main.qml
      QQmlApplicationEngine failed to load component
      http://10.126.6.15/main.qml:4 Type Foo.MyItem unavailable
      http://10.126.6.15/foo/MyItem.qml:-1 File not found
      
      qml: Did not load any objects, exiting.
      

      The qmldir file seems to be ignored in this case.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            rawoul Arnaud Vrac
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes