I want to open exe directory upper directory another subdirectory folder inside of a file, but can you tell me how to open, thanks for the great god
CodePudding user response:
QT current folder seems to be in an exe file directory, so your path should be ".. XXX_ folder/XXX_ filename
CodePudding user response:
./subdir/file
CodePudding user response:
Or you can temporarily use absolute paths
CodePudding user response:
. \ acb \ test. TXT
CodePudding user response:
Hello, I use a relative path to open has been failed, such as case1, 2; Use absolute paths can be, however, such as case3 Case 1: f.o pen (" QDir: : currentPath ()/prog1. Yukio okamoto, "); break; Case 2: f.o pen ("./prog2. Yukio okamoto, "); break; Case 3: f.o pen (" D:/Qt_work/pj3/prog3. Yukio okamoto, "); break; I f is used the fstream, prog files and my CPP, pro of what are in the same directory, consult