How to create a container with reference objects in Qt?
Solved
General and Desktop
-
Good afternoon.
Made this vector:QVector <MoveItem> vectorMoveItem;
Separately create objects of the class:
MoveItem *item = new MoveItem(); // Create a graphic element
In vector vector Move Item to record the item objects?
It doesn't work:vectorMoveItem.append(*item);
-
Store pointers, not objects
-
Hi,
Did you put enough elements in this vector ?