How to run external QT program from PyQT5 on MacOS
-
wrote on 22 Jan 2022, 19:01 last edited by Benjamin Halko
@SGaist It gave the same error
LSOpenURLsWithRole() failed with error -10810 for the file /Users/benjamin/Desktop/Dolphin.app.
Oh and I tried starting the .app not executable in
/Contents/MacOS/
-
Which version of Qt are your application and Dolphin using ?
-
wrote on 22 Jan 2022, 23:40 last edited by Benjamin Halko
@SGaist I am using PyQt5 (I think version 5.12.2) And I have been informed that Dolphin uses 5.15.0 (C++). Although it seems that Dolphin uses this custom version ...maybe???
-
You should try with both using the same version of Qt.
-
wrote on 25 Jan 2022, 22:20 last edited by Benjamin Halko
My bad I was using PyQt5 version 5.15.5, but I will still try using Dolphins version.
-
wrote on 26 Jan 2022, 19:56 last edited by Benjamin Halko
@SGaist Ok so I update PyQt5 and I used
['open', '/Users/benjamin/Desktop/Dolphin.app/Contents/MacOS/Dolphin'],shell=False
and it worked!
But then when I went to use['open', '/Users/benjamin/Desktop/Dolphin.app/Contents/MacOS/Dolphin', '--args', '-e', gamePath],shell=False
to try to load a game, it gave me theopen
command usage dialog. Is there something wrong with using--args
?
Also I tried things like opening with just/Users/benjamin/Desktop/Dolphin.app
or usingshell=True
but they also didn't work...I wonder if the arguments for Dolphin only work when running from the Dolphin.app and not the /Contents.... one.
Took a look and yep, the /Contents one doesn't support arguments... -
@SGaist Ok so I update PyQt5 and I used
['open', '/Users/benjamin/Desktop/Dolphin.app/Contents/MacOS/Dolphin'],shell=False
and it worked!
But then when I went to use['open', '/Users/benjamin/Desktop/Dolphin.app/Contents/MacOS/Dolphin', '--args', '-e', gamePath],shell=False
to try to load a game, it gave me theopen
command usage dialog. Is there something wrong with using--args
?
Also I tried things like opening with just/Users/benjamin/Desktop/Dolphin.app
or usingshell=True
but they also didn't work...I wonder if the arguments for Dolphin only work when running from the Dolphin.app and not the /Contents.... one.
Took a look and yep, the /Contents one doesn't support arguments...@Benjamin-Halko said in How to run external QT program from PyQT5 on MacOS:
Is there something wrong with using --args?
I don't know.
What exactly does "command usage dialog" tell you? You're probably using --args wrongly. -
@Benjamin-Halko said in How to run external QT program from PyQT5 on MacOS:
Is there something wrong with using --args?
I don't know.
What exactly does "command usage dialog" tell you? You're probably using --args wrongly.wrote on 27 Jan 2022, 20:23 last edited by Benjamin Halko@jsulm It is just what it gives you when you just type
open
.Also, when launching the .app from Python, Dolphin starts then immediately crashes with this error message using Apples Crash Message Screen Thing: https://pastebin.com/NqBK0YvQ (It also shows
LSOpenURLsWithRole() failed with error -10810 for the file /Users/benjamin/Desktop/Dolphin.app.
in the terminal window) -
@jsulm It is just what it gives you when you just type
open
.Also, when launching the .app from Python, Dolphin starts then immediately crashes with this error message using Apples Crash Message Screen Thing: https://pastebin.com/NqBK0YvQ (It also shows
LSOpenURLsWithRole() failed with error -10810 for the file /Users/benjamin/Desktop/Dolphin.app.
in the terminal window)@Benjamin-Halko As I said you first need to find out how to call Dolphin properly.
Try to pass it -h parameter to get more information.
21/29