PDA

View Full Version : Simple QGraphicsItem question



godmodder
13th November 2008, 10:42
Hello,

I want to save the position and orientation of a QGraphicsItem, so I can load it from file again. What would be the best way to do this? Am I obligated to store a whole transformation matrix for each item or is there a better way?

Jeroen

h123
13th November 2008, 16:45
Not sure but you can...
1) store the co-ordinates of the item in QByteArray and stroe QByteArray into file, on load read this file and set item's co-ordinates

or

2) use the QSettings to store the the item co-ordinates

aamer4yu
13th November 2008, 18:34
You can design ur own data... like angle, scale, pos.