#include <iostream>
#include <stdlib.h>
#include <QString>
#include <QFile>
#include <qdebug.h>
#include <QTextStream>
using namespace std;
int main(void)
{
QString file_path("f:/13432420.02o");
QFile o_file(file_path);
if (!o_file.open(QIODevice::ReadOnly))
{
qDebug() << "Cannot open" << file_path << endl;
system("pause");
exit(EXIT_FAILURE);
}
QTextStream read(&o_file);
QString readString;
readString = read.readLine();
qDebug() << "first line : " << readString << endl;
int index = readString.indexOf("3");
cout << "index : " << index << endl;
QString qstrVerson = readString.mid(0,9).trimmed();
qDebug() << "QString : " << qstrVerson << endl;
double dVerson = readString.mid(0,9).toDouble();
cout << "double : " << dVerson << endl;
QString str = "2001";
bool ok;
int iVerson = str.toInt(&ok,10);
cout << "int : " << iVerson << endl;
cout << ok << endl;
system("pause");
return 0;
}