自定义选定项 Surface3d

Customize selected Item Surface3d

当我在 surface3d 中点击那个项目时,如何更改它?

我想展示一个 3d 模型而不是那个球体或者...只是想自定义它

我搜索了 google 和 qt 文档以及 qml 中的所有属性,但没有解决方案...

例如==> MySurface.qml :

Surface3D
{
    id:mySurface
    Surface3DSeries
    {
        id:mySeries
        drawMode: Surface3DSeries.DrawSurface
        ItemModelSurfaceDataProxy
        {
            id:myModel
            itemModel: ListModel{
                ListElement
                {
                    // added some points like :
                    idNumber:"10"
                    cost:"4900"
                }
            }
        }
    }
}

感谢解答。 我们有一个问题,我们不是在谈论 2d 场景,我需要在单击时知道 3 个点...... 我的意思是我们需要知道 Qt.Vector3d(...) 单击了 Surface3d ,当我知道我可以创建一些 CustomeItem like this

我在表面上创建了对象,但现在我想在单击 3d 时更改该球体,但我找不到任何 属性 或通过单击 surfac3d 给出点 (Qt.Vector3d) 的任何函数。

In addition: we cant use TapHandler or MouseArea in Surface3D ...

感谢您的帮助。

最后我用了一个找到第三点的想法...

Note: added custome item before changing its position.

我用过:

        selectionMode: AbstractGraph3D.SelectionMultiSeries
        onSelectedElementChanged:
        {
            var xPoint=mySeries.selectedPoint.x;
            var yPoint=mySeries.selectedPoint.y;
            var i;
            if(xPoint!=-1)
            {
                for(i=0;i<myListModel.count;++i)
                {
                    if(myListModel.get(i).idNumber==xPoint
                            &&  myListModel.get(i).cost==yPoint)
                    {
                        myCustom3DItem.position=Qt.vector3d(yPoint,myListModel.get(i).height,xPoint);
                        break;
                    }
                }
            }
        }