Hallo Guys,
I have a txt-File, which contains values like that :
distance force
0.090721 0.0072147
0.181527 0.0139748
0.270888 0.0203682
0.360796 0.0262649
0.451177 0.0317043
0.541753 0.0366577
0.632632 0.0409662
0.724928 0.0451153
I just need to read the tow values of the last line but separately. For example: if i pressed a Qpushbutton (1) i get 0.724928, and if i pressed a Qpushbutton (2) i get 0.0451153 .
i've tried the following code, but i always get the first value of the last line (0.724928)..my question is how to get the second value of the last line (0.0451153) ?
QFile inputFile("measurnments.txt");
if (inputFile.open(QIODevice::ReadOnly))
{
QTextStream in(&inputFile);
while (!in.atEnd())
{
QString line = in.readLine();
this->display->setText(line);
}
inputFile.close();
}
I'm just a Newbie , so i'll be grateful und i'll appreciate it if somone could help me
Best Reagrds
Bookmarks