[Qt-interest] dropEvent of QGraphicsProxyWidget

Mihail Naydenov mlists at ymail.com
Wed Oct 28 15:46:15 CET 2009


>From: Bo Sun <b.sun at tlk-thermo.com>
>To: qt-interest at trolltech.com
>Sent: Wed, October 28, 2009 4:13:18 PM
>Subject: [Qt-interest] dropEvent of QGraphicsProxyWidget
>
> >
>
>
>>
>Hello,
> 
>I have a problem to reimplement dropEvent for a subclass of QGraphicsProxyWidget.
>In the constructor I have called setAcceptDrops(true), but the dropEvent could
>not be triggered. In a scene I used addItem to insert a instance of this
>subclass and I tried to drag something on it, but it does not work. The cursor
>shows that dropping is forbidden. I have also created a subclass of QWidget and
>reimplement its dragEnterEvent and dropEvent just like what is written in the
>help document, of course its setAcceptDrops(true) is called. Using this
>subwidget the problem stays still there. Do you have any idea?
> 
>Thanks a lot if you can give me some help for that.
> 
>Regards
>Bo
> 

Have you implemented dragMoveEvent on the Item as well?
I remember having the same problem with QGraphicsScene itself - only enter and drop does not work.

MihailNaydenov



      



More information about the Qt-interest-old mailing list