QPlaceRatings¶
The
QPlaceRatings
class holds rating information about a place. More…

Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
average
()def
count
()def
isEmpty
()def
maximum
()def
setAverage
(average)def
setCount
(count)def
setMaximum
(max)
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()
function returns an aggregated ratings value out of a possible maximum as given by themaximum()
function.qDebug() << QString("This place rated ") + place.ratings().average() + "out of " + place.ratings().maximum() + "stars";
-
class
QPlaceRatings
¶ QPlaceRatings(other)
- param other
Constructs a new ratings object.
Constructs a copy of
other
.
-
PySide2.QtLocation.QPlaceRatings.
average
()¶ - Return type
qreal
Returns the average value of individual ratings.
See also
-
PySide2.QtLocation.QPlaceRatings.
count
()¶ - Return type
int
Returns the total number of individual ratings.
See also
-
PySide2.QtLocation.QPlaceRatings.
isEmpty
()¶ - Return type
bool
Returns true if all fields of the place ratings are 0; otherwise returns false.
-
PySide2.QtLocation.QPlaceRatings.
maximum
()¶ - Return type
qreal
Returns the maximum possible rating value.
See also
-
PySide2.QtLocation.QPlaceRatings.
__ne__
(other)¶ - Parameters
other –
QPlaceRatings
- Return type
bool
Returns true if
other
is not equal to this ratings object, otherwise returns false.
-
PySide2.QtLocation.QPlaceRatings.
__eq__
(other)¶ - Parameters
other –
QPlaceRatings
- Return type
bool
Returns true if
other
is equal to this ratings object, otherwise returns false.
-
PySide2.QtLocation.QPlaceRatings.
setAverage
(average)¶ - Parameters
average –
qreal
Sets the
average
value of the ratings.See also
-
PySide2.QtLocation.QPlaceRatings.
setCount
(count)¶ - Parameters
count –
int
Sets the total number of individual ratings to
count
.See also