Look into QString::section().
I was able to use it to pick out desired sentences from one big text file to display the desired directions along with the images that can be iterated through (for a knot tying app).
Here is what I used to get it to work, maybe it will do what you need?
//open file for instructions
str = (QString::fromUtf8(":/images/docs/texts/instructions/Instructions.txt"));
QString line2 = in2.readAll();
instructions = line2.section(str1, 1, 1); //load instructions with all the selected instructions
int tmp(strLst.count()); //setup counter with number of images
for(int i = 0; i < tmp; i++)
inst += instructions.section('.', i, i); //load strlist inst with each sentance
// qDebug() << "*****" << inst.at(i) << "*******";