Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Interfaces between C++ and QML Code

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() 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 - 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() 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 - 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() 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 - 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() 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 - 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() 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 - 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() 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 - 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() 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 - 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() 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 - QGeoCoordinate

The 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 - QGeoAddress

The 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 - QGeoBoundingBox

The 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 - QGeoBoundingCircle

The 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 - QGeoLocation

The 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));
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web