did you try something like this?
void FileProcessor::processFile()
{
QList< QHash<QString, float> > data;
...
while (!file.atEnd()) {
...
data << processLine(file.readLine());
...
}
...
}
QHash<QString, float> FileProcessor
::processLine(const QString &line
){
QHash<QString, float> res;
//parse the line and fill the hash
return res;
}
void FileProcessor::processFile()
{
QList< QHash<QString, float> > data;
...
while (!file.atEnd()) {
...
data << processLine(file.readLine());
...
}
...
}
QHash<QString, float> FileProcessor::processLine(const QString &line)
{
QHash<QString, float> res;
//parse the line and fill the hash
return res;
}
To copy to clipboard, switch view to plain text mode
Bookmarks