On 26 June 2016 at 04:40, Igor Mironchik <igor.mironc...@gmail.com> wrote: ... > My delete method is: > > void > Form::deleteItems( const QList< QGraphicsItem* > & items ) > { Snip lot of logic > }
What about: Form::deleteItems( const QList< QGraphicsItem* > & items ) { auto command *cmd = new DeleteItemsCommand(); cmd->setItems(items) cmd->setModel(model) undoStack->push(cmd) } DeleteItemsCommand::redo() { } > > I do scene()->removeItem( item ); and delete item; but in the internals of > QGraphicsScene I got two damaged pointers... > > What is the problem? Thank you. > > P.S. postDeletion() methods now is empty, like: > > void postDeletion() > { > } > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest