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

QQmlPropertyMap does not work with QObject as property value

    XMLWordPrintable

Details

    • All
    • bcbc3c9cec1f7d7bb8c9d5f5ea94eb5c81ec2853 (qt/qtdeclarative/5.13)

    Description

      I created a map by writing this code

      QQmlPropertyMap mainPropertyMap;
      QQmlPropertyMap nestedPropertyMap;
      mainPropertyMap.insert("fruits", QVariant::fromValue(&nestedPropertyMap));
      nestedPropertyMap.insert("apples", 10);
      qDebug() << QQmlProperty::read(&mainPropertyMap, "fruits.apples", ctx);
      

      I expected 10 in debug output, but i got QVariant(Invalid).

      Also, i cannot use  property "fruits.apples" in QML Type Binding

      Attachments

        For Gerrit Dashboard: QTBUG-79614
        # Subject Branch Project Status CR V

        Activity

          People

            fabiankosmale Fabian Kosmale
            vitek vitek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes