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

Better way to find objects in QML via C++

    XMLWordPrintable

Details

    Description

      Currently in order to find the object under test in qmltest you have to go via objectName. This is a little cumbersome, because it means that your production code is filled with objectNames that have no benefit other than as test hooks. A more elegant solution would be preferable - perhaps QmlTest could find them using a QmlContext and an id? Or there could be a way to find elements declaratively (the first MouseArea in MyApp.qml with an id matching theArea and width:20).

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes