1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

OSX: Fixed file association (close #65)

This commit is contained in:
Paweł Jastrzębski
2014-01-21 18:09:22 +01:00
parent 25a68ebdea
commit 1e5bfc9f66

8
kcc.py
View File

@@ -108,6 +108,14 @@ class QApplicationMessaging(QtWidgets.QApplication):
self._memory.detach() self._memory.detach()
self._server.close() self._server.close()
def event(self, e):
if e.type() == QtCore.QEvent.FileOpen:
# noinspection PyArgumentList
self.messageFromOtherInstance.emit(bytes(e.file(), 'UTF-8'))
return True
else:
return QtWidgets.QApplication.event(self, e)
def isRunning(self): def isRunning(self):
return self._running return self._running