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

QML_SEQUENTIAL_CONTAINER and QT_QMLCACHEGEN_DIRECT_CALLS are undocumented

    XMLWordPrintable

Details

    • All
    • e9155711f (dev), f8091d321 (6.5), 9abd54590 (dev), ebbbe3ce0 (6.5)

    Description

      When passing a custom QList to qml:

      typedef QList<QColor> ColorList;
      Q_DECLARE_METATYPE(ColorList)
      
      void main()
      {
       //...
          qRegisterMetaType<ColorList>("ColorList");
      }
      
      class MyClass : QObject
      {
      	QML_ELEMENT
      	Q_PROPERTY(ColorList colors)
      };
      

      then qmlint shows this warning:

      :-1: error: Example.qml:47:28: Type "ColorList" of property "colors" not found. This is likely due to a missing dependency entry or a type not being exposed declaratively.
      

      Replacing "ColorList" with "QVariantList" removes this error but then also the type information (e.g. "QColor") is lost in Qml.

      Attachments

        1. qmlmaptest.zip
          8 kB
        2. screenshot-1.png
          screenshot-1.png
          109 kB

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              Harald Meyer Harald Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes