Hi guys,
I have a question regarding get data from readLine() function.
Currently, my function read line by line from a text file.
Each line has two numbers with a space between them. (eg. 234.23 454.32).
Is there a way to get those two number separately?
Here is my code.
Qt Code:
if(!myFile.exists()){ qDebug()<<"The file"<<myFile.fileName()<<"does not exist."; return false; } qFatal("Could not open the file"); return false; } while (!st.atEnd()){ QString text; text=st.readLine(); qDebug() << text;To copy to clipboard, switch view to plain text mode
In the code each line is stored in text and displayed by qDebug(). I would like to also display each numbers in a line sperately like x value is 234.23 and y value is 454.32.
Any idea?
Bookmarks