Maybe you don't have access rights or something?
The same code works in Boost::filesystem, but doesn't integrate easily into the application I need this for which was built using Qt.
All I'm really trying to do is set a path and then print that path. Is there something else I need to do for it to work in Qt?