QGraphicsItem 容易誤解點

一、setAcceptDrops(true);      這個設置後,並非能拖動,而是能夠接受dropEvent事件,也就是能響應到拖拽時的放下事件,不設置該屬性,則視爲該Item不能Drop。 拖拽由下面的 mouseMoveEvent 中的QDrag實現code 二、mouseMoveEvent void GQIGraphicsItem::mouseMoveEvent(QGraphicsSce
相關文章
相關標籤/搜索