[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QDesktopServices.setUrlHandler not called on OS X
From:       Marko Luther <marko.luther () gmx ! net>
Date:       2019-07-07 12:14:21
Message-ID: FC6A0A19-7C28-4F1A-80B4-04859AA393D7 () gmx ! net
[Download RAW message or body]

Dear Florian,

thanks for this clarification. That connection between QDesktopServices.setUrlHandler \
and the QDesktopServices.openUrl escaped my eye. I will use the IPC mechanism to \
resolve this.

Thanks!
Marko

> On 7. Jul 2019, at 13:35, Florian Bruhin <me@the-compiler.org> wrote:
> 
> Hi,
> 
> On Sun, Jul 07, 2019 at 01:12:22PM +0200, Marko Luther wrote:
> > Now it seems to me that the 
> > 
> > > QDesktopServices.setUrlHandler
> > 
> > is doing nothing, at least on Mac OS X and Windows.
> > 
> > Windows seems not to be able to send even the event to an already running
> > instance of the app that got registered via the corresponding registry
> > entries. Instead it starts a new instance of the app and hands the URL over
> > via sys.args. Strange.
> > 
> > Is nobody using URL schemes?
> 
> QDesktopServices.setUrlHandler probably doesn't do what you think it does. It
> only affects URLs opened via QDesktopServices.openUrl in Qt.
> 
> From its docs:
> 
> This function provides a way to customize the behavior of openUrl(). If
> openUrl() is called with a URL with the specified scheme then the given method
> on the receiver object is called instead of QDesktopServices launching an
> external application.
> 
> It does talk about recieving data from other apps after that, but that seems to
> be iOS-specific.
> 
> At least for macOS, you'll need to mention the scheme in your Info.plist and
> get an OpenEvent with that URL. On Windows, indeed you get the URL as an
> argument. What applications do typically is communicating with the existing
> instance via IPC and then quitting the new instance.
> 
> Florian
> 
> -- 
> https://www.qutebrowser.org | me@the-compiler.org (Mail/XMPP)
> GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
> I love long mails! | https://email.is-not-s.ms/

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic