内容表

上一话题

QPlaceProposedSearchResult

下一话题

QPlaceReply

QPlaceRatings

QPlaceRatings class holds rating information about a place. 更多

Inheritance diagram of PySide2.QtLocation.QPlaceRatings

概要

函数

详细描述

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 the maximum() 函数。

qDebug() << QString("This place rated ") + place.ratings().average()
            + "out of " + place.ratings().maximum() + "stars";
											
class QPlaceRatings

QPlaceRatings(other)

param other

QPlaceRatings

Constructs a new ratings object.

构造副本为 other .

PySide2.QtLocation.QPlaceRatings. average ( )
返回类型

qreal

Returns the average value of individual ratings.

另请参阅

setAverage()

PySide2.QtLocation.QPlaceRatings. count ( )
返回类型

int

Returns the total number of individual ratings.

另请参阅

setCount()

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.

另请参阅

setMaximum()

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.

另请参阅

average()

PySide2.QtLocation.QPlaceRatings. setCount ( count )
参数

count int

Sets the total number of individual ratings to count .

另请参阅

count()

PySide2.QtLocation.QPlaceRatings. setMaximum ( max )
参数

max qreal

Sets the maximum possible rating value to max .

另请参阅

maximum()