Undostack decrement problem
-
Thanks for the reply..actually "in my application at a time i am updating the color for 5 rectitems ..i was created a undocolourcommand but it was changing the rectitems to its previous color after pressing undo option 5 times..i don't want like that i want all rectitems to their previous color at a time"
@
foreach( QGraphicsItem *item, m_chip->parentItem()->childItems() )
{qgraphicsitem_cast<Chip *>(item)->updateColor( m_oldColor );
}
@here m_chip is rectitem...the above code was not working now could you please help me.. how to do it
-
Ah, I see. You did read the "description of macros":http://doc.qt.nokia.com/4.7/qundostack.html#command-compression-and-macros and the API docs of "QUndoStack::beginMacro() ":http://doc.qt.nokia.com/4.7/qundostack.html#beginMacro, but you just overlooked the example in the latter, didn't you?