have a look at the constructors of QVector. If I understand your issue correctly, you'll find an appropriate one

why do you have to use a qvector? when you have several non-used elements, maybe a diofferent type would fit better...