problems when reading files (problems with .pro)
QFile file("D:\\Qt\\test\\out.txt");
when i use the absolutePath, it works all right
but when i use
QFile file("./out.txt");
i seems that i can't read the file
out.txt and the code are in the same dir
how to solve the problem with relative path
THX
Re: problems when reading files (problems with .pro)
Well obviously your executable and your text file aren't in the same folder. See [WIKI]Current working directory[/WIKI] for a possible solution.
Re: problems when reading files (problems with .pro)
i've solved the problem myself. a totally newbie's problem, maybe
edit the .qrc file and all problems are gone
:p