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

In Qml, "children" property always having length zero

    XMLWordPrintable

Details

    Description

      In the attached example, it was expected that "root.children" list wasn't empty (zero length). I think this is related to the following facts:

      • "children" property is the one implemented in QObject;
      • QDeclarativeItem::setParentItem not longer uses QObject parent-hood as before since commit 6f88388db4e8e202780d789e66664ff824691948. I think "children" used to work because of that, but was incorrect since QGraphicsItems shouldn't also use QObject parent-hood (so, in my understanding the commit itself is correct).

      Even accounting those two facts, I was expecting in the test case to get at least length == 1, since there's a QtObject in the tree as well. But I didn't checked whether this QtObject is wrapped into a QDeclarativeItem as well.

      I tested with commit db9bfd3653de23693db67ec5a0534e4d4ac97f7d from 4.7 branch.

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            cmarcelo Caio Marcelo de Oliveira Filho
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes