Hey, I am trying to create a GUI which should be very basic in nature. I just want to have some input field for the parameters and a plot button, and when I click the plot button it should plot it on the GUI.
I have been trying to set up something described above, but I am failing to do so. Gtk is no longer being maintained, as I have learned. Gtk4 is, but it is also not so reliable. I also installed Mousetrap but that also doesn’t seem fit for the job, as for plotting their widget MousetrapMakie is not working atm.
Now the thing is, what gets plotted is the solution of a complex PDE. Designing a GUI in Python is much more reliable according to my experience but the problem is of course the speed of Julia. it takes <1 second with Julia to calculate the PDE whereas in python >90 seconds.
I have also considered using a Python GUI with a Julia backend PDE calculator, but somehow I also couldnt get this to work.
I am not sure what to do. Any kind of help is appreciated!
If by “input field for the parameters” you mean a full text editing widget, though, we don’t have that. Only simple text boxes for single lines currently.
Right, I don’t know which is best, since I’ve not used any of the the options, but since I’ve been recommending Mousetrap.jl on perception I would like to know what works well with it and what doesn’t.
People DO recommend QML.jl over it. But I think the former also just works with some non-OpenGL plotting. I don’t know it it’s CairoMakie.jl or something completely unrelated from Makie.
That’s also an option, anything from Python for the GUI, then juliacall, i.e. PythonCall.jl to call Julia.
FYI: I decided to test and see what breaks with Mousetrap.jl or well MousetrapMakie.jl. At first I only got the former to install. In the end I could sort of use “the latter” and get a window…
Note, Moustrap.jl alone seems to work, i.e. “the Hello World” I tried from the README.
Note there’s mousetrap_jll but I didn’t use libmousetrap_jll since I couldn’t find it nor install (is it supposed to be the same and was renamed?). There’s also available that I didn’t install: mousetrap_apple_jll, mousetrap_windows_jll, and mousetrap_linux_jll
PkgPrecompileError: The following 1 direct dependency failed to precompile:
MousetrapMakie [aebf437e-4a9b-4da2-be5f-abfe051cab05]
Failed to precompile MousetrapMakie [aebf437e-4a9b-4da2-be5f-abfe051cab05] to "/home/pharaldsson/.julia/compiled/v1.10/MousetrapMakie/jl_ZzCTIv".
ERROR: LoadError: UndefVarError: `retina_scaling_factor` not defined
Did you try QML? I think this is the most mature option. Makie is also an option, but I use it for 3D graphics only. If you need nice classical GUI elements like drop-down boxes etc, then I think QML is a better choice than Makie.
You can also combine them, but that works only with some older Makie version.
This is also a question I have been wondering about. Mousetrap seemed promising, but I was not able to Render a rectangle with OpenGL in its examples. With the author on sick leave, I would want to wait until he is back.
For me, ideally the GUI will work on the Raspberry PI 4 as well as more powerful machines. OpenGL is not supported well on the RPI, where CairoMakie and GLMakie seem to be too demanding on the hardware. I have not yet tried QML.jl but it has received some recommendations in discourse in the past. I would be curious what people also recommend for the RPI. @ufechner7
Edit: ufechner7 answered while I was composing my reply!