How to open another application from Qt application with specific file
-
Hi!
I want to start another application from my qt application (like it's done with QProcess) but with a specific file or content, just like the OS does (with the corresponding program that can read the extention) when clicking on the file in a file browser/explorer/on desktop or whatever.How can I achieve that in Qt?
Thanks for answers! -
Hi
if yes to @koahnig questions then
http://doc.qt.io/qt-5/qdesktopservices.html#
and
http://doc.qt.io/qt-5/qdesktopservices.html#openUrl -
@koahnig said in How to open another application from Qt application with specific file:
You mean you have a gui showing a couple of files and you want start an application based on the extension of a file selected from your gui?
Well, I would rather open a file in a specific application, not nesseccairly based on the extension... (if that is possible)
And I don't want any type of file selection, I just want the application to start the other app automatically (based on a press onto a button in my application, but without any manually file selection)@mrjj said in How to open another application from Qt application with specific file:
Hi
if yes to @koahnig questions then
http://doc.qt.io/qt-5/qdesktopservices.html#
and
http://doc.qt.io/qt-5/qdesktopservices.html#openUrlThank you, it works pretty well!
But is there a way to specity, which application should be started with the file as parameter (like "open with")?