IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Ratings QML Type

The Ratings type holds place rating information.

This type was introduced in QtLocation 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Ratings QML Type

  • Import Statement: import QtLocation 5.12

  • Since: QtLocation 5.5

  • Group: Ratings is part of qml-QtLocation5-places, qml-QtLocation5-places-data

Detailed Description

Rating information is used to describe how good a place is conceived to be. Typically this information is visualized as a number of stars. The average property gives an aggregated ratings value out of a possible maximum as given by the maximum property.

 
Sélectionnez
import QtQuick 2.0
import QtPositioning 5.5
import QtLocation 5.6

Text {
    text: "This place is rated " + place.ratings.average + " out of " + place.ratings.maximum + " stars."
}

Property Documentation

 

average : real

This property holds the average of the individual ratings.

See Also

See also maximum

count : int

This property holds the total number of individual user ratings used in determining the overall ratings average.

maximum : real

This property holds the maximum rating value.

ratings : QPlaceRatings

For details on how to use this property to interface between C++ and QML see "Interfaces between C++ and QML Code".

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+