QPlaceRatingsclass holds rating information about a place. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
average
()
def
count
()
def
isEmpty
()
def
maximum
()
def
setAverage
(average)
def
setCount
(count)
def
setMaximum
(max)
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()函数。qDebug() << QString("This place rated ") + place.ratings().average() + "out of " + place.ratings().maximum() + "stars";
QPlaceRatings
¶
QPlaceRatings(other)
- param other
Constructs a new ratings object.
构造副本为
other
.
PySide2.QtLocation.QPlaceRatings.
average
(
)
¶
qreal
Returns the average value of individual ratings.
另请参阅
PySide2.QtLocation.QPlaceRatings.
count
(
)
¶
int
Returns the total number of individual ratings.
另请参阅
PySide2.QtLocation.QPlaceRatings.
isEmpty
(
)
¶
bool
Returns true if all fields of the place ratings are 0; otherwise returns false.
PySide2.QtLocation.QPlaceRatings.
maximum
(
)
¶
qreal
Returns the maximum possible rating value.
另请参阅
PySide2.QtLocation.QPlaceRatings.
__ne__
(
other
)
¶
other
–
QPlaceRatings
bool
返回 true 若
other
is not equal to this ratings object, otherwise returns false.
PySide2.QtLocation.QPlaceRatings.
__eq__
(
other
)
¶
other
–
QPlaceRatings
bool
返回 true 若
other
is equal to this ratings object, otherwise returns false.
PySide2.QtLocation.QPlaceRatings.
setAverage
(
average
)
¶
average
–
qreal
设置
average
value of the ratings.
另请参阅
PySide2.QtLocation.QPlaceRatings.
setCount
(
count
)
¶
count
–
int
Sets the total number of individual ratings to
count
.
另请参阅