0

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:

that

but it should look like this:

that

Is there any way to create a link / shortcut with arguments?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.