Results 1 to 5 of 5

Thread: How to make changes in QTextDocument without creating undo item?

  1. #1
    Join Date
    May 2008
    Location
    Ukraine, Berdyansk
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to make changes in QTextDocument without creating undo item?

    How to change QTextBlockFormat for particular blocks without pushing undo items to undostack?

  2. #2
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: How to make changes in QTextDocument without creating undo item?

    You can do so using QTextCursor.

  3. #3
    Join Date
    May 2008
    Location
    Ukraine, Berdyansk
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to make changes in QTextDocument without creating undo item?

    each time when i do QTextCursor::setBlockFormat, undo item is pushed into document internal undo stack.

    a lot of QTextCursor::setBlockFormat calls push a lot of undo, which should not be pushed.

  4. #4
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make changes in QTextDocument without creating undo item?


  5. #5
    Join Date
    May 2008
    Location
    Ukraine, Berdyansk
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to make changes in QTextDocument without creating undo item?

    QTextCursor::setBlockFormat should not change undo stack

Similar Threads

  1. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.