[Qt-interest] Finding default programme for file type

alessandro.portale at nokia.com alessandro.portale at nokia.com
Fri Aug 6 10:14:14 CEST 2010


If you just want to open the default application that is associated to the .txt extension, try QDesktopServices::openUrl()
   http://doc.qt.nokia.com/4.6/qdesktopservices.html#openUrl
The same will happen as if the user double clicks on a .txt file in the file explorer.

I believe that getting the name of the default application is trickier. I do not know of a Qt Api for that.

Alessandro
________________________________________
From: qt-interest-bounces at trolltech.com [qt-interest-bounces at trolltech.com] On Behalf Of ext yogesh upreti [yogesh.upreti at gmail.com]
Sent: Friday, August 06, 2010 09:34
To: qt-interest at trolltech.com
Subject: [Qt-interest] Finding default programme for file type

Hallo All,
Does someone know how can I find default programme for a file type in Windows?
For example I have some text file for which I allow user to edit, but every user have there owe programme to edit those file.
Where can I found this setting out in Windows? (In unix I am forcing everyone to use nedit (Nirvana Editor)).

Thanks in advance
Yogesh Upreti




More information about the Qt-interest-old mailing list