Results 1 to 3 of 3

Thread: Drag/Drop: Drop indicator doesn't change for drags between QListView and QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    Madison, WI USA
    Posts
    153
    Thanks
    35
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Drag/Drop: Drop indicator doesn't change for drags between QListView and QTableVi

    SOLVED:

    I guess if I would reimplement all the required functions I would not have this trouble. The default implementation of dragMoveEvent() ignores events. Overridding this function fixes this problem.

    Qt Code:
    1. void SheetView::dragMoveEvent( QDragMoveEvent* pEvent )
    2. {
    3. if ( !pEvent->mimeData()->hasFormat( MY_MIMETYPE ) )
    4. {
    5. pEvent->ignore();
    6. return;
    7. }
    8.  
    9. pEvent->accept();
    10. }
    To copy to clipboard, switch view to plain text mode 

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

    ComServant (8th July 2013)

Similar Threads

  1. Replies: 0
    Last Post: 4th May 2010, 10:24
  2. Drag and Drop from QListView to QGraphicsView
    By NoRulez in forum Qt Programming
    Replies: 0
    Last Post: 20th August 2009, 14:26
  3. Drag and drop indicator
    By iswm in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2007, 18:58
  4. qlistview drag&drop problem
    By moowy in forum Qt Programming
    Replies: 8
    Last Post: 13th October 2006, 14:49
  5. Problem with drag&drop in qlistview
    By mambo in forum Qt Programming
    Replies: 2
    Last Post: 11th September 2006, 16:14

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.