On Monday 26 September 2016 7:32:54 PM IST Paolo Angelelli wrote: > Hi Kishore, have you tried "property var coordinate"?
Yes. I found mention of it in the documentation. But then i don't know how to create an alias to it's members. Second, I want to initialize it to an invalid coordinate and ensure type safety by ensuring that it can not be assigned to anything other than a coordinate. Is that possible? -- Cheers! Kishore > best > Paolo > > On Mon, 26 Sep 2016 16:11:03 +0530 > > Kishore Jonnalagadda <kitts.mailingli...@gmail.com> wrote: > > I have created an custom Item in which I want to have a coordinate > > property. Further i want to create aliases to the coordinates > > properties. How do i go about this? > > > > Example: > > > > /******/ > > Item { > > > > id: myCustomItem > > > > property coordinate coordinate > > property alias latitude: coordinate.latitude > > property alias longitude: coordinate.longitude > > property alias altitude: coordinate.altitude > > > > } > > /******/ > > > > I have also tried the following format... > > > > /******/ > > Item { > > > > id: myCustomItem > > > > property alias coordinate: coordinate > > property alias latitude: coordinate.latitude > > property alias longitude: coordinate.longitude > > property alias altitude: coordinate.altitude > > > > Coordinate {id: coordinate} > > > > } > > /******/ > > > > But for some reason, the second form results in a segmentation fault. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest