I was close... 
This is what worked;
instructions = line2.section(str1, 1, 1)
int tmp(instructions.count('.') );
for(int i = 0; i < tmp; i++)
{
inst += instructions.section('.', i, i);
qDebug() << "*****" << inst.at(i) << "*******";
}
instructions = line2.section(str1, 1, 1)
int tmp(instructions.count('.') );
for(int i = 0; i < tmp; i++)
{
inst += instructions.section('.', i, i);
qDebug() << "*****" << inst.at(i) << "*******";
}
To copy to clipboard, switch view to plain text mode
I had to remove all the carriage returns in the text file also.
Here is the file format;
Bowline Form an overhand loop.Pass the end up through the loop from underneath.Pass the end behind the standing part.Bring the end back down through the loop.To tighten grip the end and the loop in one hand and the standing part in the other. .Be sure to form the knot properly. Bowline
Bowline Form an overhand loop.Pass the end up through the loop from underneath.Pass the end behind the standing part.Bring the end back down through the loop.To tighten grip the end and the loop in one hand and the standing part in the other. .Be sure to form the knot properly. Bowline
To copy to clipboard, switch view to plain text mode
and the output;
***** "Form an overhand loop " *******
***** "Pass the end up through the loop from underneath " *******
***** "Pass the end behind the standing part " *******
***** "Bring the end back down through the loop " *******
***** "To tighten grip the end and the loop in one hand and the standing part in the other " *******
***** " " *******
***** "Be sure to form the knot properly " *******
***** "Form an overhand loop " *******
***** "Pass the end up through the loop from underneath " *******
***** "Pass the end behind the standing part " *******
***** "Bring the end back down through the loop " *******
***** "To tighten grip the end and the loop in one hand and the standing part in the other " *******
***** " " *******
***** "Be sure to form the knot properly " *******
To copy to clipboard, switch view to plain text mode
Thanks again!
Cheers,
Jon
Bookmarks