Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134459

spreadsheets and texteditor examples (and others?) should have undo/redo functionality

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • None
    • None

      Users will want to have this feature; so we should make sure it's easy enough. The idea came up while reviewing https://codereview.qt-project.org/c/qt/qtdeclarative/+/628474 : TableView will commit edits when a cell loses focus. Each cell's editor could have its own built-in undo/redo feature, but probably it makes more sense to have an application-wide QUndoStack. https://doc.qt.io/qt-6/qundo.html is about how to do that in widget apps. How should we do it in Qt Quick Controls apps?

      BTW after fixing QTBUG-105531 we still don't have Undo on the context menu. And the Spreadsheets example doesn't have context menus at all.

      Control-Z / Control-Shift-Z does work in the TextEditor example. So that's a case of doing it in the view, and that works well enough in that case because there is only one TextEdit in the application. If you had multiple entry fields, the one that has focus would get the command, I suppose; so that's not the same case as a whole-application QUndoStack. So how would we accommodate that, in general? But at least it would be easy enough to add the menu items to this example, since there is only one editor.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes