Results 1 to 8 of 8

Thread: QAbstractItemModel with QUndoStack

Threaded View

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

    Default Re: QAbstractItemModel with QUndoStack

    Quote Originally Posted by No-Nonsense View Post
    The undo / redo commands would use the standard model interface or some added custom interface so that the model would emit dataChanged and make use of beginInsert... etc.
    Ok, but if you use setData() in your app that creates a QUndoCommand which calls setData again, you'll have an endless recursion. Use of custom methods is a solution here of course.

    The problem for me is how to implement this. I have a filtered table view on the model and a configurable number of widgets using a QDataWidgetMapper.
    Well, in that case it'd be hard to do it this way.

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

    No-Nonsense (21st February 2007)

Similar Threads

  1. Help needed with QAbstractItemModel
    By Harvey West in forum Qt Programming
    Replies: 11
    Last Post: 27th November 2006, 12:06
  2. QAbstractItemModel for dummies
    By morty in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2006, 15:25
  3. Subclassing QAbstractItemModel
    By r366y in forum Qt Programming
    Replies: 2
    Last Post: 2nd May 2006, 08:46
  4. [QT4] QTreeView, QAbstractItemModel and sorting
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 24th March 2006, 20:16
  5. Replies: 8
    Last Post: 7th March 2006, 13:40

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.