In my project I have created an sqlite database along with 3 tables...what I would like to do it take three csv files that are being downloaded, using the Qt Network Download example, and insert them into their appropriate tables so that I can work with the data (query, etc) in other qml pages within the app.
I have seen some examples about parsing the files and inserting values but at the moment I have not been able to successfully insert the data from the csv files to the tables.
If I include the code below to see if the file can be found, I do receive the "File is Open" response so that is a step in the right direction.
QFile file("filename.csv");
qDebug() << "File not open" << file.error();
} else {
qDebug() << "File is open";
}
QFile file("filename.csv");
if(!file.open(QIODevice::ReadOnly)){
qDebug() << "File not open" << file.error();
} else {
qDebug() << "File is open";
}
To copy to clipboard, switch view to plain text mode
Should this process be included in the Network Download code, which I have in a separate .cpp file or can it go right into the main.cpp file? Also - can someone point me in the direction of some good examples of this or provide some insight on how I might accomplish this?
Bookmarks