
Originally Posted by
caduel
What error cause does
QFile::errorString() give?
(On linux: make sure you have read permissions and, of course, that the path to the file is correct.)
i have tested,
{
QDataSteam in(&file);
in >> inin;
textEdit->setPlainText(inin);
}
else
cerr<<file.error();
if (file.open(QIODevice::Readonly))
{
QDataSteam in(&file);
QString inin;
in >> inin;
textEdit->setPlainText(inin);
}
else
cerr<<file.error();
QMessageBox::informaion(this, tr("OktoberFest"), tr("drink beer"), QMessageBox::ok);
To copy to clipboard, switch view to plain text mode
the feedback is 5, that means The file could not be opened.
but actually i can open it use Textpad
Bookmarks