PDA

View Full Version : File type associations under Windows or Linux



bred
6th November 2010, 14:51
How we capture the application associated with a file type under Windws or Linux.
For example the pdf files are normally associated by the system with adobe reader ...

SixDegrees
6th November 2010, 16:47
It depends. Under Windows and Mac, file associations are handled by the OS; under Linux, they're typically handled by the desktop manager you're using. Actually, this is also somewhat true on the two former systems, but the distinction between OS and Desktop is blurred so they appear to be the same thing.

Here's an article about it (http://en.wikipedia.org/wiki/File_association).

ecanela
6th November 2010, 19:50
i think the question is a little ambiguos.

if you need open a file using a external app (the default app) you can use the static function QDesktopServices::openUrl ( ), but if you need know the default app name who the SO use for open a PDF file maybe you need review the source code of the openUrl() function.

sorry my poor english

bred
7th November 2010, 16:56
i think the question is a little ambiguos.

if you need open a file using a external app (the default app) you can use the static function QDesktopServices::openUrl ( ), but if you need know the default app name who the SO use for open a PDF file maybe you need review the source code of the openUrl() function.

sorry my poor english

It likes to be the better solution.