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

Details

    • 2e110daa8fb

    Description

      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.
      }

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes