Results 1 to 8 of 8

Thread: drop event becomes invalid

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: drop event becomes invalid

    What do you mean with "it becomes invalid"?
    Where in your code does that lead to a problem?

    Cheers,
    _

  2. #2
    Join Date
    Jul 2013
    Posts
    72
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: drop event becomes invalid

    When I drag an tree item to my plot, I'm sure the drag event was triggered since the mouse was moving with the item icon which I set as the drag picture. But when releasing the mouse which should had triggered the drop event, nothing happened.

  3. #3
    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: drop event becomes invalid

    Do you get the drag enter and move events?

    Cheers,
    _

  4. #4
    Join Date
    Jul 2013
    Posts
    72
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: drop event becomes invalid

    yeah, both of drag enter and move events are accepted. But no drop event .

  5. #5
    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: drop event becomes invalid

    Ah, so the problem is that Plot::dropEvent() is not called, not that it is called with an invalid event, right?

    Have you switched the widget's acceptDrop property to true?

    Cheers,
    _

  6. #6
    Join Date
    Jul 2013
    Posts
    72
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: drop event becomes invalid

    this->setAcceptDrops(true);

    I have set this property, the problem above happens occasionally. The program runs fine most of the time.

  7. #7
    Join Date
    Jul 2013
    Posts
    72
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: drop event becomes invalid

    what else can I do?

Similar Threads

  1. Replies: 1
    Last Post: 5th February 2014, 09:17
  2. Replies: 2
    Last Post: 13th October 2010, 21:51
  3. Replies: 0
    Last Post: 4th May 2010, 10:24
  4. qtreewidget and drop event detection
    By eric_vi in forum Qt Programming
    Replies: 1
    Last Post: 19th February 2010, 11:20
  5. Replies: 2
    Last Post: 24th October 2009, 23:45

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
  •  
Qt is a trademark of The Qt Company.