Unsolved QML and QUndoStack? do we still need a C++ wrapper?
-
Hi,
I don't find many examples on how to plug myQUndoStack
in QML.
I'd like at least an Undo and Redo buttons with the action text and why not also theQUndoView
in a reactiveListView
.
Aren't there an easy way to plug all that in QML? oO
I've found just this kind of example Qt with Cascades UI Examples Documentation where we need a C++UndoManager
wrapper.
Is it still the case nowadays?
It doesn't look complicated but I'm just wondering if there is not a more straight forward solution.
If you've examples on how to display theQUndoView
in a QMLListView
, plz share :) -
Hi,
AFAIK yes you still have to. As for integrating the view, you should take a look at KDAB's declarative widgets project.
-
@SGaist my example was from Nokia 2012, the very beginning of QML if I remember well... How come somthing such important as the Undo Framework is not available directly in QML and/or even better shared between C++ and QML?...
I'll check your article. But does those delaratives Widgets have a native look on mobile devices (Android and iOS?).
One of the reason I switched recently (2020) from Widgets to QML was mainly to relaease "native apps" on all OS.
Any idea if there will be a work on Qt6 as they said to make Widgets look native too on mobile devices? -
I do not know, it's something you can ask on the interest mailing list.
As for the Declarative Widgets project, I don't think they do anything special for look and feel. The goal is to be able to use widgets in QtQuick applications.
I don't know the current plans for widgets on mobile.