I am reading from a binary file, and want to insert into a QList. Is there an easier way to do the following? (e.g. in one line)
QStringList traceNames;
for(qint64 i=0; i<numTraces; i++)
{
QString name;
stream >> name;
traceNames << name;
}
stream
is a QDataStream
.
I was thinking something like traceNames << stream
(which did not work).
Aucun commentaire:
Enregistrer un commentaire