am still struggling... help
well I have made some progress, in dragmovement of Scene, I check the position of the event, and set the item according to that position. I use pointer to the item within the mimedata of the drag event.
The Drag is started in mousepress event of Scene.
{ ...
...
...
}
void CScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ ...
...
QDrag *drag = new QDrag(event->widget());
...
}
To copy to clipboard, switch view to plain text mode
But now while checking if the drag started from this scene or not, I use event->source(), which returns a QWidget* and this is of type QGraphicsScene.
if (qobject_cast<CScene*>(event->source()) == this)
if (qobject_cast<CScene*>(event->source()) == this)
To copy to clipboard, switch view to plain text mode
problem is, this condition doesnt matches.
I want to know if handling the events in QGraphicsView will be a better option or not ?
and in what case should I opt to implement them in QGraphicsScene ??
plz help
Bookmarks