Results 1 to 5 of 5

Thread: dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

    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:

    Qt Code:
    1. virtual void dropEvent ( QDropEvent * event );
    2. virtual void dragEnterEvent ( QDragEnterEvent * event);
    3. virtual void mouseMoveEvent ( QMouseEvent * event);
    4. virtual void mousePressEvent ( QMouseEvent * event);
    5. virtual void dragLeaveEvent ( QDragLeaveEvent * event );
    6. virtual void dragMoveEvent ( QDragMoveEvent * event );
    To copy to clipboard, switch view to plain text mode 

    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.
    Last edited by wagmare; 27th April 2014 at 14:02.
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

    Do you mean that neither the view nor the video widget get the drop event?

    Cheers,
    _

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

    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
    "Behind every great fortune lies a crime" - Balzac

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

    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,
    _

  5. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: dropEvent(QDropEvent *event) is not getting called in Phonon::VideoWidget

    Yes i tried but it is not receiving it and if i replace the phonon item with some other item im receiving the events.
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. Phonon::VideoWidget/VideoPlayer issues
    By prophet0 in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2012, 23:23
  2. Phonon VideoWidget
    By prophet0 in forum Qt Programming
    Replies: 1
    Last Post: 7th November 2011, 11:43
  3. dropEvent() is never called
    By kervich in forum Qt Programming
    Replies: 1
    Last Post: 10th September 2010, 13:13
  4. Zoom in a Phonon::VideoWidget
    By linus in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2010, 21:13
  5. Drag and Drop, dropEvent not being called?
    By steg90 in forum Qt Programming
    Replies: 36
    Last Post: 22nd May 2007, 07:03

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.