Closing an external application with qt
Hello everyone,
Please how do i close an application i previously opened with in qt c++.
Because i need to update text in a pdf i already opened outside my application at a point in time.
And also i would like to know the difference between and
Code:
[DOCS]Qt::openUrlExternally[/DOCS]
and basically when to use them.
Re: Closing an external application with qt
Quote:
Originally Posted by
Capton
Please how do i close an application i previously opened with QDesktopServices::OpenURL
You don't. QDesktopServices::openUrl() is fire-and-forget. Your program has only knows whether the operating system successfully opened something to handle the URL you gave it (return value), not how that process might be identified, or whether there was actually a unique process and not, for example, another tab in existing process. If you need that sort of control you should look at QProcess.
Quote:
i would like to know the difference between QDesktopServices::OpenURL and Qt::openUrlExternally and basically when to use them.
Ignoring the typos... QDesktopServices::openUrl() is a C++ construct, and Qt.openUrlExternally() is QML. They both do the same thing in different environments.