Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
Some future release
-
None
Description
Parent item is integral part of QML, which essentially describes a dynamic object tree. Currently parent property is only accessible for visual QML elements inheriting from QGraphicsObject. Many non-visual QML elements in Qt Mobility QML bindings don't have parent property, making the developer experience inconsistent and unintuitive.
Following code should work:
import QtQuick 1.0 Rectangle { width: 200; height: 300 property string name: "Rectangle" QtObject { Component.onCompleted: { console.log("Parent name is", parent.name) } } }
Attachments
Issue Links
- relates to
-
QTBUG-60121 Row and Column Repeater children have wrong QObject parent
- Closed
-
QTBUG-64546 Instantiator: provide a way to set the QObject parent of the objects it creates
- Reported
-
QTBUG-15085 Provide a way to change QObject parent
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-17286 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
385410,6 | Allow reparenting Pointer Handlers | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |