hakiim35
31st August 2010, 13:45
Hi, I want to drag a QTreeWidgetItem from my QTreeWidget to the QGraphicsPixmapItem.
Do I have to reimplement mouse events in the drag site.
I reimplemented them such as
mousePressEvent(QGraphicsSceneMouseEvent *e);
mouseMoveEvent(QGraphicsSceneMouseEvent *e);
mouseReleaseEvent etc..
but the program flow never falls into the mouse events in debug mode.
I have also performed setAcceptDrops(true) in my QGraphicsPixmapItem's constructor and reimplemented the dropEvent( QDropEvent *event ) but again the flow never falls inside it.
How will I be able to perform the drag & drop?
My aim is to send the currently dragged QTreeWidgetItem's text to the QGraphicsPixmapItem.
Best regards.
Do I have to reimplement mouse events in the drag site.
I reimplemented them such as
mousePressEvent(QGraphicsSceneMouseEvent *e);
mouseMoveEvent(QGraphicsSceneMouseEvent *e);
mouseReleaseEvent etc..
but the program flow never falls into the mouse events in debug mode.
I have also performed setAcceptDrops(true) in my QGraphicsPixmapItem's constructor and reimplemented the dropEvent( QDropEvent *event ) but again the flow never falls inside it.
How will I be able to perform the drag & drop?
My aim is to send the currently dragged QTreeWidgetItem's text to the QGraphicsPixmapItem.
Best regards.