I know that to create a new path in Qt from a given absolute path, you use QDir::makepath()
how dir.makepath(path)
, as suggested in this question. I have no problem using it and it works great. My question is directed as to why , developers will not provide a static function to call in this way QDir::makepath("/Users/me/somepath/");
. I need to create a new instance QDir
.
I can only think of two possible reasons:
1. The developers were "lazy" or did not have time, so they did not add, as this is not entirely necessary.
2. The instance QDir
being called mkpath(path)
will also be set to path
, so that would be convenient for future use - but I can't seem to find any hints that this is the actual behavior in the docs .
I know that I’m repeating it myself, but again, I do n’t need help on how to do this, but I’m very curious why this should be done that way. Thanks for any reason I might have missed.
source
share