[Qt-interest] [4.5] QGraphicsView does not propagate drag & drop events

André Somers andre at familiesomers.nl
Tue Jul 28 08:08:36 CEST 2009


Hi,

 

I am trying to implement a QGraphicsView-based visualization that requires
some drag and drop. While dropping objects on the scene works nicely, I am
having trouble implementing dragging one GraphicsViewItem onto another. The
drag operation starts, but there does seem to be any drag & drop events
happening in my graphic items. I have called setAcceptDrops(true) on the
graphics items that should accept drops, but that does not seem to help. 

I am not sure if it is relevant, but the items I am dragging are child items
of items that have the QGraphicsItem::ItemIsMovable flag set. 

 

I have reimplemented all the relevant methods in the item that should
receive the drop (dragEnterEvent, dragMoveEvent, dragLeaveEvent, dropEvent)
but qDebug() statements show that they are not called. Is there something I
am overlooking?

 

Thanks!

 

André

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090728/e58ae4d6/attachment.html 


More information about the Qt-interest-old mailing list