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

id is only set if there are quotes around the id in QML source.

XMLWordPrintable

    • 2e110daa8fb

      Retrieving the id of a QML object in C++ code with a call to QObject::objectName() only works if there are quotes around the id name in the QML source. Yet, examples in the QML documentation do not have quotes around id names.

      Rectangle
      {
      id: hello // This id is NOT retrievable via a C++ call to QObject::objectName()...
      }

      Rectangle
      {
      id: "hello" // ...but this one is.
      }

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

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            dominic.genest Dominic Genest
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes