Interfaces between C++ and QML CodeCategory - QPlaceCategoryThe Category.category property is used to provide an interface between C++ and QML code. First a pointer to a Category object must be obtained from C++, then use the property() and setProperty() functions to get and set the category property. The following gets the QPlaceCategory representing this object from C++: QPlaceCategory category = qmlObject->property("category").value<QPlaceCategory>(); The following sets the properties of this object based on a QPlaceCategory object from C++: qmlObject->setProperty("category", QVariant::fromValue(category)); ContactDetail - QDeclarativeContactDetailThe ContactDetail.contactDetail property is used to provide an interface between C++ and QML code. First a pointer to a ContactDetail object must be obtained from C++, then use the property() and setProperty() functions to get and set the contactDetail property. The following gets the QPlaceContactDetail representing this object from C++: QPlaceContactDetail contactDetail = qmlObject->property("contactDetail").value<QPlaceContactDetail>(); The following sets the properties of this object based on a QPlaceContactDetail object from C++: qmlObject->setProperty("contactDetail", QVariant::fromValue(contactDetail)); Place - QPlaceThe Place.place property is used to provide an interface between C++ and QML code. First a pointer to a Place object must be obtained from C++, then use the property() and setProperty() functions to get and set the place property. The following gets the QPlace representing this object from C++: QPlace place = qmlObject->property("place").value<QPlace>(); The following sets the properties of this object based on a QPlace object from C++: qmlObject->setProperty("place", QVariant::fromValue(place)); PlaceAttribute - QPlaceAttributeThe PlaceAttribute.attribute property is used to provide an interface between C++ and QML code. First a pointer to a PlaceAttribute object must be obtained from C++, then use the property() and setProperty() functions to get and set the attribute property. The following gets the QPlaceAttribute representing this object from C++: QPlaceAttribute placeAttribute = qmlObject->property("attribute").value<QPlaceAttribute>(); The following sets the properties of this object based on a QPlaceAttribute object from C++: qmlObject->setProperty("attribute", QVariant::fromValue(placeAttribute)); Icon - QPlaceIconThe Icon.icon property is used to provide an interface between C++ and QML code. First a pointer to a Icon object must be obtained from C++, then use the property() and setProperty() functions to get and set the icon property. The following gets the QPlaceIcon representing this object from C++: QPlaceIcon placeIcon = qmlObject->property("icon").value<QPlaceIcon>(); The following sets the properties of this object based on a QPlaceIcon object from C++: qmlObject->setProperty("icon", QVariant::fromValue(placeIcon)); User - QPlaceUserThe User.user property is used to provide an interface between C++ and QML code. First a pointer to a User object must be obtained from C++, then use the property() and setProperty() functions to get and set the user property. The following gets the QPlaceUser representing this object from C++: QPlaceUser placeUser = qmlObject->property("user").value<QPlaceUser>(); The following sets the properties of this object based on a QPlaceUser object from C++: qmlObject->setProperty("user", QVariant::fromValue(placeUser)); Ratings - QPlaceRatingsThe Ratings.ratings property is used to provide an interface between C++ and QML code. First a pointer to a Ratings object must be obtained from C++, then use the property() and setProperty() functions to get and set the ratings property. The following gets the QPlaceRating representing this object from C++: QPlaceRatings placeRatings = qmlObject->property("ratings").value<QPlaceRatings>(); The following sets the properties of this object based on a QPlaceRatings object from C++: qmlObject->setProperty("ratings", QVariant::fromValue(placeRatings)); Supplier - QPlaceSupplierThe Supplier.supplier property is used to provide an interface between C++ and QML code. First a pointer to a Supplier object must be obtained from C++, then use the property() and setProperty() functions to get and set the supplier property. The following gets the QPlaceSupplier representing this object from C++: QPlaceSupplier placeSupplier = qmlObject->property("supplier").value<QPlaceSupplier>(); The following sets the properties of this object based on a QPlaceSupplier object from C++: qmlObject->setProperty("supplier", QVariant::fromValue(placeSupplier)); Coordinate - QGeoCoordinateThe Coordinate.coordinate property is used to provide an interface between C++ and QML code. First a pointer to a Coordinate object must be obtained from C++, then use the property() and setProperty() functions to get and set the coordinate property. The following gets the QGeoCoordinate representing this object from C++: QGeoCoordinate geoCoordinate = qmlObject->property("coordinate").value<QGeoCoordinate>(); The following sets the properties of this object based on a QGeoCoordinate object from C++: qmlObject->setProperty("coordinate", QVariant::fromValue(geoCoordinate)); Address - QGeoAddressThe Address.address property is used to provide an interface between C++ and QML code. First a pointer to a Address object must be obtained from C++, then use the property() and setProperty() functions to get and set the address property. The following gets the QGeoAddress representing this object from C++: QGeoAddress geoAddress = qmlObject->property("address").value<QGeoAddress>(); The following sets the properties of this object based on a QGeoAddress object from C++: qmlObject->setProperty("address", QVariant::fromValue(geoAddress)); BoundingBox - QGeoBoundingBoxThe BoundingBox.box property is used to provide an interface between C++ and QML code. First a pointer to a BoundingBox object must be obtained from C++, then use the property() and setProperty() functions to get and set the box property. The following gets the QGeoBoundingBox representing this object from C++: QGeoBoundingBox geoBoundingBox = qmlObject->property("box").value<QGeoBoundingBox>(); The following sets the properties of this object based on a QGeoBoundingBox object from C++: qmlObject->setProperty("box", QVariant::fromValue(geoBoundingBox)); BoundingCircle - QGeoBoundingCircleThe BoundingCircle.circle property is used to provide an interface between C++ and QML code. First a pointer to a BoundingCircle object must be obtained from C++, then use the property() and setProperty() functions to get and set the circle property. The following gets the QGeoBoundingCircle representing this object from C++: QGeoBoundingCircle geoBoundingCircle = qmlObject->property("circle").value<QGeoBoundingCircle>(); The following sets the properties of this object based on a QGeoBoundingCircle object from C++: qmlObject->setProperty("circle", QVariant::fromValue(geoBoundingCircle)); Location - QGeoLocationThe Location.location property is used to provide an interface between C++ and QML code. First a pointer to a Location object must be obtained from C++, then use the property() and setProperty() functions to get and set the location property. The following gets the QGeoLocation representing this object from C++: QGeoLocation geoLocation = qmlObject->property("location").value<QGeoLocation>(); The following sets the properties of this object based on a QGeoLocation object from C++: qmlObject->setProperty("location", QVariant::fromValue(geoLocation)); |