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
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
Well obviously your executable and your text file aren't in the same folder. See [WIKI]Current working directory[/WIKI] for a possible solution.
lhdgriver (23rd July 2010)
i've solved the problem myself. a totally newbie's problem, maybe
edit the .qrc file and all problems are gone
![]()
Bookmarks