virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override; // 悬停事件函数,设置光标外观和提示 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; // 右键菜单函数,为图形项添加一个右键菜单 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override; pri...