QGraphicsItem::ItemIsMovable in QGraphicsScene, add actions on drop
Hi!
I have a QGraphicsScene set in a QGraphicsView
In the scene I put a pixmap which is movable.
If the user drags and drops the pixmap inside the QGraphicsScene, on the drop action, I want to do some things in my program.
Code:
_scene = std::make_shared<QGraphicsScene>();
ui->graphicsView->setScene(_scene.get());
Does anyone know how to do such a thing? Is it possible with reimplementation of dragEnterEvent, dragMoveEvent, dropEvent? I tried it in the GraphicsScene and the GraphicsView but it didn't reach my reimplemented event methods.
Thank you
Gal
Re: QGraphicsItem::ItemIsMovable in QGraphicsScene, add actions on drop
If you move the pixmap item, then there is no drag&drop involved at all.
Cheers,
_
Re: QGraphicsItem::ItemIsMovable in QGraphicsScene, add actions on drop
Thanks, I got confused, I needed to use mouseReleaseEvent