[Qt-interest] [4.5] QGraphicsView does not propagate drag & drop events
Andre Somers
andre at familiesomers.nl
Tue Jul 28 13:57:10 CEST 2009
Hi,
Amit Kumar Sharma wrote:
> Items do not receive drag and drop events by default; to enable this
> feature, call setAcceptDrops(true).
>
>
Thanks, but that is not very helpfull. In my question, I already wrote:
I have called setAcceptDrops(true) on the
graphics items that should accept drops, but that does not seem to help.
Any other suggestions of what I may be overlooking?
André
> On Tue, Jul 28, 2009 at 11:38 AM, André Somers<andre at familiesomers.nl> wrote:
>
>> 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é
>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>>
>
>
>
>
More information about the Qt-interest-old
mailing list