steadi
23rd October 2012, 03:45
Hello,
I am looking for a way to create a new variable for a qgraphicsitem. I need to set it for save and load purposes but how would i go about doing this?
The end result should be something along these lines:
QGraphicsItem *temp;
temp = scene->addPixmap([blah blah blah]);
temp->customvariable = 1; //This is the variable i want to create (int) for each time i add the graphicsitem
Thanks in advance and sorry if i did not explain this very well but it is late.
Matt
I am looking for a way to create a new variable for a qgraphicsitem. I need to set it for save and load purposes but how would i go about doing this?
The end result should be something along these lines:
QGraphicsItem *temp;
temp = scene->addPixmap([blah blah blah]);
temp->customvariable = 1; //This is the variable i want to create (int) for each time i add the graphicsitem
Thanks in advance and sorry if i did not explain this very well but it is late.
Matt