Define parameter with value "a"

Add to container

Change parameter to value "b"

Debugging container -> output is "b"

As 1+1=2 states, you can store pointers or references instead. Alternatively, you can store explicitly shared values in the container. There really are not much more than a nice value-based wrapper around a shared data pointer.

Note that all Qt containers take copies of the values you put in, so you need to put a type inside your container for which the copy still represents the same underlying data: a reference, a pointer or a construct like an explicitly shared value.