If you don't know any maximum number of elements then use QList as wagmare already suggested.

Not sure why you bring up threads though.

Cheers,
_