[SOLVED] QFile open in text mode error.
-
I've got some text file in some text path, but when I try to open it in ReadOnly and Text mode fuction open returns false. Here is the code:
@#define XML_FOLDER "Data"QString path = QString(""%1%2%3%2%4"").arg(QApplication::applicationDirPath()).arg(QDir::separator()).arg(XML_FOLDER).arg("Changelog.txt");
path = QDir::fromNativeSeparators(path);QFile file(path);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::warning(this, tr("File not found"), QString("%1\n%2").arg(tr("Can't find changelog file!")).arg(path));
return;
}@When I look at path variable value it's equal : "D:/Projects/sxAssc/Desktop/sxConfigAssc/Debug/Data/Changelog.txt" . I have a file in this path with such name and read/write premitions for all. Is it bug on 4.8.3 qt version on Windows platform or thomething else ?
-
-
Thanks, AcerExtensa. Now it works.