Results 1 to 6 of 6

Thread: Setting Text in QPlainTextEdit without Clearing Undo/Redo History

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    31
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    1

    Default Re: Setting Text in QPlainTextEdit without Clearing Undo/Redo History

    Thank you so much. It works. But it also takes the empty document (When you remove selected text) into the undo/redo history.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: Setting Text in QPlainTextEdit without Clearing Undo/Redo History

    delete the line
    Qt Code:
    1. curs.removeSelectedText ();
    To copy to clipboard, switch view to plain text mode 

    from my code
    Last edited by mcosta; 20th July 2011 at 15:23. Reason: updated contents
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Apr 2010
    Posts
    31
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    1

    Default Re: Setting Text in QPlainTextEdit without Clearing Undo/Redo History

    How could I not think about that!?
    Thank you so much. It works perfect now!

Similar Threads

  1. undo/redo example has refactored
    By n_vova in forum Qt Programming
    Replies: 1
    Last Post: 10th May 2012, 10:04
  2. Undo/Redo issues of QTextEdit
    By Maximka in forum Newbie
    Replies: 0
    Last Post: 22nd February 2010, 07:36
  3. QTextEdit undo/redo
    By Derf in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2009, 09:12
  4. Detecting a action ( undo/ redo)
    By ankurjain in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2006, 05:05
  5. Implement Undo Redo
    By ankurjain in forum Qt Programming
    Replies: 5
    Last Post: 28th March 2006, 13:17

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
  •  
Qt is a trademark of The Qt Company.