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

nested directories in QML modules dont work with "internal" types

XMLWordPrintable

    • All

      See attached reproducer example.

      A Module with QML files not in the root directory but in a e.g. "Qml" subdirectory has two Components, one beeing internal and used by the other.

      When using the not-internal Component in an application this fails with:

      qrc:/qt/qml/internalReproducer/Main.qml:9:5: Type MyItemControls unavailable
      qrc:/qt/qml/internalReproducerModule/Qml/MyItemControls.qml:10:5: InternalType is not a type

      qt_policy(
          SET QTP0004 OLD
      )

      Is a workaround, but that limits having the internal types in the same directory as the public ones.

      I'd like to have this directory Structure:

      MyModule

      • CMakeLists.txt
      • Qml (directory)
        • MyPublicComponent.qml (using MyInternalComponent)
        • private (directory)
          • MyInternalComponent.qml
      • < C++ files >

       

      https://bugreports.qt.io/browse/QTBUG-111763 discussed this a lot but to me it seems this scenario is still not fully supported.

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

            qtbuildsystem Qt Build System Team
            stefanbauer Stefan Bauer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes