PySide6.QtLocation.QPlaceRatings¶
- class QPlaceRatings¶
The
QPlaceRatings
class holds rating information about a place. More…Synopsis¶
Properties¶
Methods¶
def
__init__()
def
average()
def
count()
def
isEmpty()
def
maximum()
def
__ne__()
def
__eq__()
def
setAverage()
def
setCount()
def
setMaximum()
def
swap()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Warning
This section contains snippets that were automatically translated from C++ to Python and may contain errors.
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.print(QString("This place rated ") + place.ratings().average()) + "out of " + place.ratings().maximum() + "stars"
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property averageᅟ: float¶
This property holds the average value of individual ratings..
- Access functions:
- property countᅟ: int¶
This property holds the total number of individual ratings..
- Access functions:
- property maximumᅟ: float¶
This property holds the maximum possible rating value..
- Access functions:
- __init__()¶
Constructs a new ratings object.
- __init__(other)
- Parameters:
other –
QPlaceRatings
Constructs a copy of
other
.- average()¶
- Return type:
float
See also
Getter of property
averageᅟ
.- count()¶
- Return type:
int
See also
Getter of property
countᅟ
.- isEmpty()¶
- Return type:
bool
Returns true if all fields of the place ratings are 0; otherwise returns false.
- maximum()¶
- Return type:
float
See also
Getter of property
maximumᅟ
.- __ne__(rhs)¶
- Parameters:
rhs –
QPlaceRatings
- Return type:
bool
Returns true if
lhs
is not equal torhs
, otherwise returns false.- __eq__(rhs)¶
- Parameters:
rhs –
QPlaceRatings
- Return type:
bool
Returns true if
lhs
is equal torhs
, otherwise returns false.Setter of property
averageᅟ
.Setter of property
countᅟ
.Setter of property
maximumᅟ
.- swap(other)¶
- Parameters:
other –
QPlaceRatings