PDA

View Full Version : dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget



wagmare
27th April 2014, 13:41
Hi,

I have added phonon::VideoWidget in QGraphicsScene/View and have set the setAcceptDrop(true) for phonon::VideoWidget.
I have created a class which is inherited from QGraphicsView and have overridden below events function:


virtual void dropEvent ( QDropEvent * event );
virtual void dragEnterEvent ( QDragEnterEvent * event);
virtual void mouseMoveEvent ( QMouseEvent * event);
virtual void mousePressEvent ( QMouseEvent * event);
virtual void dragLeaveEvent ( QDragLeaveEvent * event );
virtual void dragMoveEvent ( QDragMoveEvent * event );

Also set setAcceptDrop(true) in this class too.

I am receiving all events(mentioned above) except dropEvent(QDropEvent * event). dropEvent (QDropEvent *) is getting called if I am adding any other QGraphicsItem instead of Phonon::VideoWidget.

Im using qt-4.8.4 in windowa 7.

anda_skoa
27th April 2014, 14:13
Do you mean that neither the view nor the video widget get the drop event?

Cheers,
_

wagmare
28th April 2014, 06:01
Do you mean that neither the view nor the video widget get the drop event?

Yes . Im not getting drop event neither in view nor in video widget . i tried this by creating a custom class inherited from Phonon::VideoWidget and overridden all event functions

anda_skoa
28th April 2014, 07:47
Hmm.

Can you try installing an event filter in the QApplication object and check if it sees the drop event and if yes, which object it is sent to?

Cheers,
_

wagmare
28th April 2014, 10:23
Yes i tried but it is not receiving it and if i replace the phonon item with some other item im receiving the events.