Interfaces between C++ and QML Code in Qt Location露
Some of the location QML types providing interfaces to access and modify properties in C++.
Category - QPlaceCategory露
The 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()andsetProperty()functions to get and set thecategoryproperty. The following gets theQPlaceCategoryrepresenting this object from C++:QPlaceCategory category = qmlObject->property("category").value<QPlaceCategory>();The following sets the properties of this object based on a
QPlaceCategoryobject from C++:qmlObject->setProperty("category", QVariant::fromValue(category));
ContactDetail - QDeclarativeContactDetail露
The 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()andsetProperty()functions to get and set thecontactDetailproperty. The following gets theQPlaceContactDetailrepresenting this object from C++:QPlaceContactDetail contactDetail = qmlObject->property("contactDetail").value<QPlaceContactDetail>();The following sets the properties of this object based on a
QPlaceContactDetailobject from C++:qmlObject->setProperty("contactDetail", QVariant::fromValue(contactDetail));
Place - QPlace露
The 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()andsetProperty()functions to get and set theplaceproperty. The following gets theQPlacerepresenting this object from C++:QPlace place = qmlObject->property("place").value<QPlace>();The following sets the properties of this object based on a
QPlaceobject from C++:qmlObject->setProperty("place", QVariant::fromValue(place));
PlaceAttribute - QPlaceAttribute露
The 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()andsetProperty()functions to get and set theattributeproperty. The following gets theQPlaceAttributerepresenting this object from C++:QPlaceAttribute placeAttribute = qmlObject->property("attribute").value<QPlaceAttribute>();The following sets the properties of this object based on a
QPlaceAttributeobject from C++:qmlObject->setProperty("attribute", QVariant::fromValue(placeAttribute));
Icon - QPlaceIcon露
The 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()andsetProperty()functions to get and set theiconproperty. The following gets theQPlaceIconrepresenting this object from C++:QPlaceIcon placeIcon = qmlObject->property("icon").value<QPlaceIcon>();The following sets the properties of this object based on a
QPlaceIconobject from C++:qmlObject->setProperty("icon", QVariant::fromValue(placeIcon));
User - QPlaceUser露
The 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()andsetProperty()functions to get and set theuserproperty. The following gets theQPlaceUserrepresenting this object from C++:QPlaceUser placeUser = qmlObject->property("user").value<QPlaceUser>();The following sets the properties of this object based on a
QPlaceUserobject from C++:qmlObject->setProperty("user", QVariant::fromValue(placeUser));
Ratings - QPlaceRatings露
The 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()andsetProperty()functions to get and set theratingsproperty. 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
QPlaceRatingsobject from C++:qmlObject->setProperty("ratings", QVariant::fromValue(placeRatings));
Supplier - QPlaceSupplier露
The 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()andsetProperty()functions to get and set thesupplierproperty. The following gets theQPlaceSupplierrepresenting this object from C++:QPlaceSupplier placeSupplier = qmlObject->property("supplier").value<QPlaceSupplier>();The following sets the properties of this object based on a
QPlaceSupplierobject from C++:qmlObject->setProperty("supplier", QVariant::fromValue(placeSupplier));
漏 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.