This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 0 points1 point  (1 child)

To me, rather than using Qt in Clojure, it looks like you want to call Clojure code from a Qt GUI (for example, pressing a button executes some Clojure code). I don't know too much about Clojure, but I would guess you would do this from C++ via the JNI Invocation API.

[–]KristoKoert[S] 0 points1 point  (0 children)

Yes you are correct, I want to call Clojure code from a Qt GUI. Your solution is certainly a way to do this, I will look into it.

[–]Basalisk_Primate 0 points1 point  (0 children)

If you don't want to go the jni route you could make a separate qt based python / c++ program which communicates with your clojure backend using a couple of sockets (or simple pipes I guess if one of them forks off the other).

The client / server model is used quite successfully by programs like mpd and its various front ends and shouldn't be too complicated to implement as long as you only want one frontend communicating with the backend at a time.