https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
n

nikunjsakhrelia

03/08/2023, 9:21 AM
I have desktop app written in python using the
QtGui
can I use the Compose for the UI, any reference will be great help
l

Loney Chou

03/08/2023, 10:26 AM
These are completely different systems. Could you explain a little bit?
n

nikunjsakhrelia

03/08/2023, 10:27 AM
I have a python script to connect serial port for read and write for that i have used QTGui as UI interface
which I want to replace with compose
if its possible to do so
b

Big Chungus

03/08/2023, 10:38 AM
CfD is only available for jvm and macos last I checked. So your only options to bridge compose ui with python is to use jvm and then call python script either via jython (jvm implementation of python) or use JNI and bridge it through C. Neither of the options is nice to work with.
If you're ok limiting yourself to macos platform then you can use native CfD and cinterop to bridge to python.
n

nikunjsakhrelia

03/08/2023, 10:39 AM
sure need windows support
i can check the jython
v

vbsteven

03/08/2023, 10:51 AM
it might be easier to skip python entirely and port the serial connection handling to a jvm library? Depending on how complex the script is.
n

nikunjsakhrelia

03/08/2023, 10:54 AM
Only 9 commands can be easily ported mostly used as debug tool
Thanks for all the responses, it's easy for me to make choice now
d

Dragos Rachieru

03/16/2023, 8:29 AM
I migrated a python project to compose. The old version was communicating using python with a Linux process. There was also a way to do this using c++ so I migrated to JNI. It works but it's pretty hard to write JNI so I migrated to a c++ gRPC server and communicate via network.
You can also create a python gRPC server if you want, it's easier than doing it in c++
3 Views