I want to create a link to a file using the QFile::link()
method. It works with files without any argument, but now I need to link to an .exe
file with arguments.
QFile(qApp->applicationFilePath()).link(QDir().homePath() + QString("/Desktop/AppArg.lnk"))
My problem is that I can't set any arguments in the destination path.
I've tried:
QFile(qApp->applicationFilePath() + " argument").link(QDir().homePath() + QString("/Desktop/AppArg.lnk"))
The shortcut looks like this:
but it should look like this:
Is there any way to create a link / shortcut with arguments?