[Interest] How do i declare a QGeoCoordinate property in QML?

Paolo Angelelli paolo.angelelli at qt.io
Mon Sep 26 19:32:54 CEST 2016


Hi Kishore, have you tried "property var coordinate"?

best
Paolo

On Mon, 26 Sep 2016 16:11:03 +0530
Kishore Jonnalagadda <kitts.mailinglists at 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.




More information about the Interest mailing list