Results 1 to 2 of 2

Thread: Can you reverse the insertRow/removeRow order when D&D in the same view?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Can you reverse the insertRow/removeRow order when D&D in the same view?

    I don't think you can reverse the order easily. Maybe a solution would be to put the new node on some kind of waiting list (so that you don't ruin your main structure) and when removeRows is called, remove the node and put the waiting node into the structure. You can use a timer to reject or accept the new node if removeRows doesn't follow the insertion. Other than that, you can reimplement dropMimeData() in your model.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following 2 users say thank you to wysota for this useful post:

    Jeffb (18th April 2012)

Similar Threads

  1. Replies: 0
    Last Post: 28th November 2011, 19:03
  2. QTableWidget/RemoveRow
    By navi1084 in forum Qt Programming
    Replies: 0
    Last Post: 28th November 2008, 11:01
  3. RemoveRow problem
    By nategoofs in forum Qt Programming
    Replies: 4
    Last Post: 18th August 2007, 13:11
  4. Reverse Order on QStringList slow...?
    By patrik08 in forum Qt Programming
    Replies: 24
    Last Post: 21st February 2007, 09:32
  5. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43

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.