Hi all, in my app I need to open a document (PDF) with the default application to view this kind of docs in the system. I've tried calling QProcess:start() with the path of the doc but it doesn't works. Could you tell me how to do it? Thanks.
Hi all, in my app I need to open a document (PDF) with the default application to view this kind of docs in the system. I've tried calling QProcess:start() with the path of the doc but it doesn't works. Could you tell me how to do it? Thanks.
on linux: if you are using KDE give the followingOriginally Posted by SkripT
kfmclient exec <filename>
GNOME:
gnome-open <filename>
Cheers
Nupul.
Thanks Nupul, but I don't use linux. I'm using Windows XP Moreover, I want to know if there's a general way to make it, without dependency of the operating system, if it's possible.Originally Posted by nupul
Thanks jpn, but I think that finally I will make it using QProcess testing the operating system and calling it with the apropiate args like Nupul has comented...
No, there is no way that I can think of to make it OS independent. See Linux uses MIME types to do the bindings with the possible apps that can handle those files. kfclient is used to manage this info of default apps etc....Windows :P may be using some technique similar...I have actually forgotten how to open a file by default app...did it long time ago and am still scouring my head for replies!!! If you ever get the answer to this lemme know too!!Originally Posted by SkripT
Nupul
SkripT (30th April 2006)
If you want I can post my class written for Windows to launch default application.
SkripT (30th April 2006)
There's no OS independant way. If you're using windows, use the ShellExecute() function. Check the msdn docs for more info.Originally Posted by SkripT
Save yourself some pain. Learn C++ before learning Qt.
SkripT (30th April 2006)
Bookmarks