[PyQt] QFileOpenEvent on mac -- working?

Calin Culianu calin.culianu at gmail.com
Wed Oct 24 21:23:56 BST 2018


Hi,

I am a developer for the Electron-Cash project which makes heavy use of
PyQt.  We love your software!

However -- in trying to get our app to receive URIs from the OS, we have
run into some hitches on macOS.   Our app uses URIs of the from:
"bitcoincash:xxxxx"

>From our testing is appears the QFileOpenEvent never makes it to our
QApplication instance no matter what we do.

We did everything right, bundled our app into a standalone .app bundle
using pyinstaller, with an Info.plist, etc.

Our app does get started by macOS, indicating that it is trying to send a
URL to our app -- however the event filter or the event() function of our
QApplication instance never receives a QFileOpenEvent.

If I replace the app with a compiled C++ program that uses Qt, we do get
the QFileOpenEvent in the event() method of the QApplication instance.

I am beginning to suspect this may be a PyQt-specific issue.

I started to grok the PyQt sources and noticed that QFileOpenEvent is
mentioned in the context of a QInputEvent "subclass" in
 sip/QtGui/qevent.sip.

However, QFileOpenEvent is not a subclass of QInputEvent.  Perhaps this is
the source of the bug?

Any insights are welcomed!

Thanks!

-Calin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181024/bbe6364e/attachment.html>


More information about the PyQt mailing list