Undo Framework | Qt Widgets 5.12.4

Qt 5.12 | Qt Widgets | Undo Framework

Qt 5.12.4 Reference Documentation

# Undo Framework

This example shows Qt's undo framework in action.

Qt's undo framework is an implementation of the Command pattern, which provides advanced undo/redo functionality.

To show the abilities of the framework, we have implemented a small diagram application in which the diagram items are geometric primitives. You can edit the diagram in the following ways: add, move, change the color of, and delete the items.

Files:

- tools/undo/commands.cpp
- tools/undo/commands.h
- tools/undo/document.cpp
- tools/undo/document.h
- tools/undo/main.cpp
- tools/undo/mainwindow.cpp
- tools/undo/mainwindow.h
- tools/undo/mainwindow.ui
- tools/undo/undo.pro
- tools/undo/undo.qrc

Images:

- tools/undo/icons/background.png
- tools/undo/icons/blue.png
- tools/undo/icons/circle.png
- tools/undo/icons/exit.png
- tools/undo/icons/fileclose.png
- tools/undo/icons/filenew.png
- tools/undo/icons/fileopen.png
- tools/undo/icons/filesave.png
- tools/undo/icons/green.png
- tools/undo/icons/ok.png
- tools/undo/icons/rectangle.png
- tools/undo/icons/red.png
- tools/undo/icons/redo.png
- tools/undo/icons/remove.png
- tools/undo/icons/triangle.png
- tools/undo/icons/undo.png