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

QML Attached properties don't work correctly with QQmlParserStatus

    XMLWordPrintable

Details

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

    Description

      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);
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              miketrahearn Mike Trahearn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes