Results 1 to 2 of 2

Thread: QT4.3.2: Drag&Drop in Model View architecture problem

  1. #1
    Join Date
    Aug 2007
    Location
    Frankfurt / Germany
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QT4.3.2: Drag&Drop in Model View architecture problem

    hi,

    i have the following problem:

    i have built a qt model/view architecure with drag&drop.
    for that i have overwritten the according methods:

    supportedDragAction
    mimeTypes
    mimeData
    and....
    dropMimeData

    i have my own QMimeData inherited class, because i want to transfer a non-standard object.

    so far so good, but now my problem:
    while dragging (moving the selected data) over the rows in my (table)views i want individually check for each row i am over,
    if a drop is accaptable or not.
    if a drop is acceptable depends on data i am currently over AND the actual dragged data....
    how can i do that?
    till now i only got the data if i do the drop operation. (dropMimeData), but i need to check if drop is accaptable over every
    data member in the views without dropping....

    Have a nice day,
    Marco

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT4.3.2: Drag&Drop in Model View architecture problem

    Quote Originally Posted by nando View Post
    i have my own QMimeData inherited class, because i want to transfer a non-standard object.
    You don't have to inherit QMimeData for that. Use QMimeData::setData() instead.

    if a drop is accaptable or not.
    if a drop is acceptable depends on data i am currently over AND the actual dragged data....
    how can i do that?
    Unfortunately you can't. I submited a suggestion report to Trolltech about it over a year ago, but it's still pending and being pushed to later releases.

    http://trolltech.com/developer/task-...6&method=entry

Similar Threads

  1. Table Model / View Problem -- Data Not Displaying
    By jhendersen in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2007, 06: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.