Results 1 to 3 of 3

Thread: QAbstractItemModel drag and drop move rows

  1. #1
    Join Date
    Mar 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QAbstractItemModel drag and drop move rows

    Hi, I started working with Qt Model/View recently and have this problem:

    I have QTreeView supported by my implementation of QAbstractItemModel. I want to enable reordering items by drag and drop operations.

    I have set all flags to enable drag and drops and now I am at point where I got insertRows and removeRows called. So now, If I implement this, i got my items reordered, right?

    But, I noticed, that there is method called moveRows. I wonder, is there a way to get this one called instead of these above and perform move in "one" step? Or I am missing something?

    thanks

  2. #2
    Join Date
    Apr 2015
    Posts
    8
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QAbstractItemModel drag and drop move rows

    Could you solve this?

  3. #3
    Join Date
    Dec 2017
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QAbstractItemModel drag and drop move rows

    Up, I have the same probleme

Similar Threads

  1. Replies: 0
    Last Post: 29th July 2015, 09:34
  2. QTreeView QAbstractItemModel drag drop
    By Qiieha in forum Qt Programming
    Replies: 1
    Last Post: 1st November 2012, 12:04
  3. Drag & Drop rows in a QTableWidget
    By vycke in forum Qt Programming
    Replies: 7
    Last Post: 19th January 2012, 01:01
  4. Qt move picture per drag and drop
    By Qiieha in forum Qt Programming
    Replies: 0
    Last Post: 14th June 2011, 12:02
  5. Replies: 0
    Last Post: 2nd June 2010, 18:52

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.