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

Implicit imports in QML

    XMLWordPrintable

Details

    Description

      When designing a QML module, it might be nice to be able to add an automatic dependency import to reduce redundancy and make the module usable with its own import.

      The theoretical example is a module , D, which needs to have its properties set using types from A B and C. A typical usage of D might look like
      import A 1.0 as A
      import B 1.0 as B
      import C 1.0 as C
      import D 1.0 as D
      D.DType { alpha: A.AType{}; beta: B.BType { flavour: C.CType { } } }

      Which would be a lot easier if you could just do
      import D 1.0 as D
      D.DType { alpha: D.AType{}; beta: D.BType { flavour: D.CType { } } }

      This is already done for importing QML types into the QtQuick 2.0 module, other modules might benefit from it as well.

      Attachments

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

        Activity

          People

            416365416c Alan Alpert
            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes