这有什么"好"的方法吗?到目前为止我发现的唯一解决方案是使用双倍的QVariantList,但它相对较慢(Core i3上1000万点~1秒)并且丑陋......
通过qml/c ++来回传递QGeoCoordinate(但可能不会扩展到1000万,没有经过压力测试)的一个好方法是使用以下
//when passsing from c++, qml will see the below as a coordinate type
QVariant::fromValue(yourQGeoCoordinateObjectHere);
//when passing coordinate from qml, the below will give you a
//QGeoCoordinate object to work with
returnedQVariantObject.value<QGeoCoordinate>();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1190 次 |
| 最近记录: |