Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Undo/Redo best practices
Forum Updated to NodeBB v4.3 + New Features

Undo/Redo best practices

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris H
    wrote on last edited by
    #1

    I'm trying to understand how best to implement an undo/redo functionality for a Qt dialog box. This dialog has a number of checkboxes and text fields: of course, checkboxes are simple enough to manage with a basic Command class (using QUndoCommand for example). However, the text fields have a built-in undo/redo functionality that it would be nice to tie into since it already handles command compression, etc. Obviously it is possible for a user to edit a text field for a bit, toggle a button, edit another field, edit the original field, toggle another checkbox, etc. and the undo method needs to accommodate undoing and redoing these things in the correct order. What is the best way to handle this type of situation?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved