geoCircle QML Value Type
geoCircle 类型表示一个圆形地理区域。更多
Import Statement: | import QtPositioning |
属性
详细说明
geoCircle 类型是表示圆形地理区域的geoShape 。它是QGeoCircle 的直接表示形式,由coordinate (指定圆的center )和 qreal(指定圆的radius ,单位为米)定义。
如果center 坐标无效或radius 坐标小于零,则该圆被视为无效。
使用示例
要创建 geoCircle 值,请使用QtPositioning.circle() 函数:
import QtPositioning Item { property geoCircle region: QtPositioning.circle(QtPositioning.coordinate(-27.5, 153.1), 1000) }
与 C++ 整合时,任何从 C++ 传入 QML 的QGeoCircle 值都会自动转换为 geoCircle 值。同样,从 QML 传递到 C++ 时,geoCircle 值也会转换为QGeoCircle 值。
属性文档
center : geoCoordinate |
该属性保存geoCircle 中心的坐标。
© 2025 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.