Hi, I'm trying to make an undo redo, I manage to have my whole thing working for user mouse drag n drop, add remove part into my model. One thing that bug me with the control 2 is the spinbox, the value is bind to the mode and the model get changed too, not sure this is the optimal way (I so wish we got 2 way binding like C# one day, this is so deeply needed and not have everybody reimplement there own way).
SpinBox { id: sequenceIndex_ value: opsModel.index onValueChanged: { // This is called before value modified } onValueModified: { // The value is already modified, how can I get previous value to make my undo/redo ? seem too late and the value changed as already been called } Binding { target: ops_model property: "index" value: sequenceIndex_.value } } How does one manage to do it with this control?! I guess I will have the same challenge with the ComboBox and all the selector controls (button are fairly easy since I can capture the previous value before doing the action).
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest