Hi there guys, I've added 4 text files as resource files to my program, but the files wont open. I would like to read and write on three of these file and "append" on the forth. Here is my code below where I try to open the file.
QFile sourcedTenders_file
(":/cpt_rcs/App_Resources/cpt/Current_Sourced_Tenders.txt");
//contains urls for sourced tenders. if(!sourcedTenders_file.
open(QFile::ReadWrite |
QFile::Text)) {
msgBox_2.setText("Url File could not open for reading...");
msgBox_2.exec();
}
QFile sourcedTenders_file(":/cpt_rcs/App_Resources/cpt/Current_Sourced_Tenders.txt"); //contains urls for sourced tenders.
if(!sourcedTenders_file.open(QFile::ReadWrite | QFile::Text))
{
QMessageBox msgBox_2;
msgBox_2.setText("Url File could not open for reading...");
msgBox_2.exec();
}
QTextStream in_stream(&sourcedTenders_file);
To copy to clipboard, switch view to plain text mode
And I have attached a picture below of where the files are situated in the file tree.filetree.PNG
Bookmarks