[Interest] Blended QProcess/QDesktopServices

Andreas Pakulat apaku at gmx.de
Wed Feb 29 14:37:56 CET 2012


On 29.02.12 05:14:33, Jason H wrote:
> I don't care about signals, or slots at or when the file is closed. (Actually I do, but I know that is irrational to expect) However if the process exits, then I know for certain the file is closed by the application. QProcess will give me this notification.
> 
> What openUrl() does is it calls ShellExecute(at least on Win). ShellExecute() then looks up the registered mime application. Then it invokes it with the file as the parameter. 
> 
> All I want to do is to dive a little deeper and set it up like I said before:
> 
> QString command = QString("%1 %2").arg(exe).arg(file);
> 
> All I want is a way (in Qt) to find out what the exe is for the system. On Windows I could look at the registry, and I don't know what facility is needed on Linux, there's probably one for each desktop.

Then look at the sources of QDesktopServices, thats where the magic
happens and its all internal, i.e. you'll have to copy the code and
create your own class doing the logic.

Andreas




More information about the Interest mailing list