[Qt-interest] dropEvent of QGraphicsProxyWidget

Bo Sun b.sun at tlk-thermo.com
Thu Oct 29 11:05:01 CET 2009


Hello Mihail,

That is the point. I got it! Thank you very much.
After I implemented dragMoveEvent on my sub widget, it did work.

Cheer
Bo

-----Ursprüngliche Nachricht-----
Von: Mihail Naydenov [mailto:mlists at ymail.com] 
Gesendet: Mittwoch, 28. Oktober 2009 15:46
An: b.sun at tlk-thermo.de; qt-interest at trolltech.com
Betreff: Re: [Qt-interest] dropEvent of QGraphicsProxyWidget

>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