本页内容

icon QML Value Type

图标类型代表某个地点的图标。更多...

Import Statement: import QtLocation 6.12
Since: QtLocation 5.5

详细说明

图标的典型用法是使用 url() 函数指定首选的图标尺寸。

图标通常取决于后端系统,如果某个管理后端不支持给定的尺寸,则会返回与这些参数最接近的图标 URL。

图标类还包含一组键值对参数。需要使用的具体键取决于所使用的插件。这些参数会影响管理器返回的图标 URL,也可用于在保存图标时指定图标 URL 的位置。

如果一个图标仅有一张图片,则可使用QPlaceIcon::SingleUrl 作为参数键,并以QUrl 作为关联值。如果设置了此键,则 url() 函数将始终返回指定的 URL,而不会交由任何管理器处理。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.