一、图元 1.给图元绑定数据(setData) item.setData(0, data) #绑定data 2.获取图元绑定的数据(data) data=item.data(0) 二、坐标 1.把x,y转为坐标(QPointF) itemPos=QPointF(posX,posY