[SailfishDevel] Undo in SailfishOS apps

Pekka Vuorela pekka.vuorela at jolla.com
Thu Oct 16 09:55:52 UTC 2014


ke, 2014-10-15 kello 16:18 +0200, ulf.swdev at e.mail.de kirjoitti:
> Hi,
> 
> I wanted to use the QUndo framework (QUndoCommand, QUndoStack) in my app...
> but the SailfishOS-SDK doesn't allow access to the QWidgets directly by
> default.
> 
> I could enable that, but as I understand use of QWidgets is not
> supported in SailfishOS.
> So what is the recommended way to implement Undo in an app? Is there another
> way to get undo functionality or is it allowed to enable QWidgets for
> this purpose?

Perhaps just application specific logic?

Alternatively this might help. Haven't tried.

http://qt-project.org/wiki/Qt-5-Ui-Helpers
https://qt.gitorious.org/qtplayground/uihelpers/source/5a530b2b9e514a83b9e5f2a66f06b37d35cac3f2:src/utils

> Actually, shouldn't QUndoCommand, QUndoStack and QUndoGroup be in QtCore and
> only QUndoView in Widgets? That would allow general usage of Undo
> functionality.

These seem to rely on QAction which was decided to keep in QWidgets due
to being too coupled with widgets.




More information about the Devel mailing list