Results 1 to 20 of 37

Thread: Drag and Drop, dropEvent not being called?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Drag and Drop, dropEvent not being called?

    Quote Originally Posted by steg90 View Post
    Well the example ( C++ GUI Programming with Qt4) doesn't use a model so I guess this is why it handles the events in the view/widget.
    Yes, it doesn't have the required infrastructure which is already present in views.
    I have just implemented the dropMimeData method in my model but it doesn't get called, I guess this is because I have the events implemented in my view?!
    Correct. You only need to reimplement the three methods mentioned, even if you want to carry custom data.

  2. The following user says thank you to wysota for this useful post:

    steg90 (21st May 2007)

  3. #2
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Drag and Drop, dropEvent not being called?

    Thanks,

    I have removed the drag/drop events from my view and implemented the three methods you mentioned into my model, but they don't get called? Do you have to set up the model to accept drops or something?

    Regards,
    Steve

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.