Important: Please read the Qt Code of Conduct -

Get PID from QDesktopServices::openUrl

  • Hello everybody,
    I was wandering if there is a way to open a URL like with QDesktopServices::openUrl and get a QProcess (or similar) object in order to kill it, if it's still alive, before closing the application.

    Thanks a lot,

  • AFAIK, it is impossible to control the process opened by QDesktopServices::openUrl.
    I think your only approach is to find out the associated application by yourself, then use QProcess to execute it, with passing url as the argument.

Log in to reply