Storing and managing huge arrays
Hello, people!
I'm starting with QT. My current aim is to store huge arrays of
seven different types. I don't not know which type exactly do I need,
it depends of file type that i'm going to read.
My idea is to write a class that has seven QVarLengthArrays. Six of
them are allways null and one stores my data. But this decision looks
quite gracelessly... So my questions are:
0. Is there any more elegant way to store my data?
1. Is QVarLengthArray sizable for this kind of job? (Storing huge(1
000 000 elements) arrays)
Thanks all of you for your time and attention!
Re: Storing and managing huge arrays
I'd use a QVector of QVariant and register your objects with QVariant using Q_DECLARE_METATYPE. This way you can use always the same code for managing your array.
Re: Storing and managing huge arrays
Quote:
Originally Posted by
wysota
I'd use a
QVector of
QVariant and register your objects with QVariant using Q_DECLARE_METATYPE. This way you can use always the same code for managing your array.
Thank you!
I have to read some docs and make some experiments... But before this may I ask you one more question? I have to process my data and its size could be changed. I need also fast access to data due to necessity of this processing.
Will QVector work well?
Re: Storing and managing huge arrays
read this article. it should answer on your question.