about summary refs log tree commit diff
path: root/kcc.py
diff options
context:
space:
mode:
Diffstat (limited to 'kcc.py')
-rwxr-xr-xkcc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kcc.py b/kcc.py
index 41a1c1b..2b1edd5 100755
--- a/kcc.py
+++ b/kcc.py
@@ -108,6 +108,14 @@ class QApplicationMessaging(QtWidgets.QApplication):
             self._memory.detach()
             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):
         return self._running