QPlaceIconclass represents an icon. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
isEmpty
()
def
manager
()
def
参数
()
def
setManager
(manager)
def
setParameters
(parameters)
def
url
([size=QSize()])
The typical usage of an icon is to use the
url()function to specify a preferred icon size.QUrl iconSourceUrl = place.icon().url(QSize(32,32)); //A default icon may also be requested like so iconSourceUrl = place.icon().url();The icons are typically backend dependent, if a manager backend does not support a given size, the URL of the icon that most closely matches those parameters is returned.
The icon class also has a key-value set of parameters. The precise key one needs to use depends on the plugin being used. These parameters influence which icon URL is returned by the manager and may also be used to specify icon URL locations when saving icons.
If there is only ever one image for an icon, then QPlaceIcon::SingleUrl can be used as a parameter key with a
QUrlas the associated value. If this key is set, then theurl()function will always return the specified URL and not defer to any manager.
QPlaceIcon
¶
QPlaceIcon(other)
- param other
Constructs an icon.
构造副本为
other
.
PySide2.QtLocation.QPlaceIcon.
SingleUrl
¶
PySide2.QtLocation.QPlaceIcon.
isEmpty
(
)
¶
bool
Returns a boolean indicating whether the all the fields of the icon are empty or not.
PySide2.QtLocation.QPlaceIcon.
manager
(
)
¶
QPlaceManager
Returns the manager that this icon is associated with.
另请参阅
PySide2.QtLocation.QPlaceIcon.
__ne__
(
other
)
¶
other
–
QPlaceIcon
bool
返回 true 若
other
is not equal to this icon, otherwise returns false.
PySide2.QtLocation.QPlaceIcon.
__eq__
(
other
)
¶
other
–
QPlaceIcon
bool
Returns true if this icon is equal to
other
,否则返回 false。
PySide2.QtLocation.QPlaceIcon.
参数
(
)
¶
Returns a set of parameters for the icon that are manager/plugin specific. These parameters are used by the manager to return the appropriate URL when
url()
is called and to specify locations to save to when saving icons.
Consult the plugin documentation for what parameters are supported and how they should be used.
另请参阅
PySide2.QtLocation.QPlaceIcon.
setManager
(
manager
)
¶
manager
–
QPlaceManager
设置
manager
that this icon is associated with. The icon does not take ownership of the pointer.
另请参阅
PySide2.QtLocation.QPlaceIcon.
setParameters
(
参数
)
¶
参数 –
Sets the parameters of the icon to
参数
.
另请参阅