Search code examples
c++windowsqtqprocessqfile

Qt5, symbolic link to a folder


A dupe-ish question of this question, which (possibly) has got an outdated answer, as I can't get it to work in Qt5.

I wish to create a symbolic link to a folder for a result similar to QFile::link(). Given that QDir doesn't have an equivalent function, QProcess (or an external library) seems like the way out if I'm up to snuff. How would this be managed in Qt5?

Big thanks in advance.


Solution

  • I found out that it cannot be done in Qt, so I ended up using the Win32 API instead. Specifically the CreateSymbolicLink() function.