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

QDeclarativeView::setSource() does not find additional QML components in the same directory

    XMLWordPrintable

Details

    Description

      When QDeclarativeView::setSource() is used to create QML Components, additional qml components in the same directory are not found or parsed. This is inconsistent with the qmlviewer behaviour, where they are.

      In the attached example, with the same two QML files, "example.qml" and "Button.qml" in the same directory, where example.qml includes a Button component.

      The Button component is displayed correctly using qmlviewer, but a trivial c++ program that creates and displays the example.qml complains that Button is not a valid class:

      file:example.qml:10:5: Button is not a type
      Button {
      ^

      Attachments

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

        Activity

          People

            wallison Warwick Allison (closed Nokia identity) (Inactive)
            debhal Julian de Bhal (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes