[Interest] How does QDesktopServices decide what application to use?

Elvis Stansvik elvstone at gmail.com
Sun Feb 15 22:41:00 CET 2015


2015-02-14 20:05 GMT+01:00 Benjamin Block <bebl at mageta.org>:

> Hello folks,
>
> just a short question about QDesktopServices. When you call the openUrl()
> function, the documentation states that the URL "will be opened with a
> suitable
> application". But how does qt decide what application to use?
>
> For example, in case I open a gif-image, it will open said image in gimp
> on my
> Linux.. which is kinda fitting, but I'd rather have it open the image with
> a
> normal viewer. Where does qt get this information from? My desktop
> environment
> (kinda KDE, but not really :D) is already properly configures and opens the
> proper viewer in case I use a normal file browser like dolphin.
>

I don't know the answer to your question, but I would suspect Qt will
follow the freedesktop.org specification for default applications on Linux.
What does xdg-open 'file:///path/to/your.gif' give you?

Elvis


> Any hints?
>
>
> best regards,
> - Benjamin
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150215/5e3fe6fb/attachment.html>


More information about the Interest mailing list