QPlaceIcon Class
The QPlaceIcon class represents an icon. More...
| Header: | #include <QPlaceIcon> |
| qmake: | QT += location |
| Since: | Qt 5.6 |
This class was introduced in Qt 5.6.
Static Public Members
| const QString | SingleUrl |
Detailed Description
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 QUrl as the associated value. If this key is set, then the url() function will always return the specified URL and not defer to any manager.
Member Variable Documentation
const QString QPlaceIcon::SingleUrl
Parameter key for an icon that only has a single image URL.
The parameter value to be used with this key is a QUrl. An icon with this parameter set will always return the specified URL regardless of the requested size when url() is called.