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

QML Attached properties don't work correctly with QQmlParserStatus

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.2.1
    • None
    • Windows 7 64-bit MingW 32

      When a custom attaching object also inherits QQmlParserStatus and implements the required "classBegin" and "classComplete" methods, I find that these methods do not get called when the attached object is created because of a usage like this:

      Rectangle {
         MyAttachingType.myAttachedProperty: "myAttachedPropertyValue"
      }
      

      Is this because the QML engine is not responsible for the creation of the attaching object because it is done in the qmlAttachedProperties function? e.g.

      MyAttachingObject *MyAttachingType::qmlAttachedProperties(QObject *object)
      {
          return newMyAttachingObject(object);
      }
      

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

            shausman Simon Hausmann
            miketrahearn Mike Trahearn
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes