Os.path.join () in Qt?

I am looking for a simple, cross-platform way to combine paths, directories, and file names into a full C ++ path. I know that python has os.path.join() , and matlab has fullfile() . Does Qt have something similar? QFileInfo does not seem to be able to do this.

+7
c ++ qt filenames path
source share
2 answers

QDir has absoluteFilePath and relativeFilePath to combine the path with the file name.

+10
source share

Offline, I'm not sure about Qt, but Boost has a filesystem class that handles such things. This has the advantage of being accepted as a proposal for TR2. This means that he has a good chance of becoming part of the C ++ standard library (although probably with some minor changes here or there).

+3
source share

All Articles