PDA

View Full Version : Running external file using its default program for opening.



kremuwa
5th August 2010, 08:53
Hello.

Is it possible to run for example .mp3 or .rar file in default program used for opening such files? I'm asking about Windows. For example, I'd like to run an .avi file and it should open in AllPlayer because it's the default program for opening files with such extension on my OS. I have taken a look on QProcess but it doesn't seem to be suitable solution here.

Thanks in advance.

Lykurg
5th August 2010, 09:26
Have a look at QDesktopServices::openUrl().

kremuwa
5th August 2010, 10:18
I have seen it since I'm using this function in my app, but I've completely forgotten that the url don't have to be Internet URL :). Thanks a lot!