UPD:
class CsvReader: public QObject { Q_OBJECT private: QFile _file; ... }
In order:
- I create an instance of CsvReader
I set the file name for _file:
_file.setFileName(name);
I open the file:
.
if(!_file.open(QIODevice::ReadOnly | QIODevice::Text)) { const char* msg = "File is imposible to open!"; emit display_dialog(msg, false, true); qDebug(_file.fileName().toAscii()); qDebug(" - File is imposible to open!\n"); return false; }
However, it does not open in the output of the application:
QFile::open: File (D:/QtProjects/foils_build/naca_1.csv) already open D:/QtProjects/foils_build/naca_1.csv - File is imposible to open!
What is wrong doing?