Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6
-
e2397fafc70fd4e5b0a375989bdcf8a402cc41c3
Description
The following example declares an alias that points to an id referenced object that declares its own properties (or at least one). That property however is not accessible when trying to access it via a group property declaration, because the type of the alias is Item and not the dynamically created type that includes the restingY property:
import QtQuick 2.3 import QtQuick.Window 2.2 Window { visible: true Eye { pupil.restingY: 20 } }
import QtQuick 2.0 Item { property alias pupil: pupil Item { id: pupil property int restingY } }
This is due to the engine failing to determine the correct property cache for the pupil group property. We determine it by asking the engine for a property cache for the type of the pupil alias property, which has the meta-type ID for "Item". We would either need to register our own type (and unregister) or, when looking for the type for the alias, follow down to the compilation unit of Eye.qml and fetch the property cache there (which has been enhanced to have the restingY property).
Attachments
Issue Links
- duplicates
-
QTBUG-69032 QML property alias is non-existent
- Closed
- relates to
-
QTBUG-72164 Deprecate grouped properties
- Closed
- resulted from
-
QTBUG-51043 Regression: crash when setting property through alias
- Closed