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

multiple QDeclarativeEngine(s) property detection error

    XMLWordPrintable

Details

    Description

      There seems to be a bug when using QDeclarativeEngine/QDeclarativeExpression inside a function, and calling this function multiple times with the same QObject. The QObject's proprties are detected for the first use of a QDeclarativeEngine but not for the second use.

      This can be solved by either using a pointer to QDeclarativeEngine or declaring it as static.
      See attached the example demonstrating this problem. The second call to
      void setName(QObject* pp_object, const QString& p_name)
      creates an error message
      "<Unknown File>: Error: Cannot assign to non-existent property "objectName""
      Whereas multiple calls to either
      void setNameStatic(QObject* pp_object, const QString& p_name)
      and
      void setNamePointer(QObject* pp_object, const QString& p_name)
      work fine.

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            mawiesma Martin Wiesmann (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes