How to make a GUI in Julia?

34,269

Solution 1

This is quite a generic question, but I'll try and layout the environment so that you can make an informed decision based on your needs. You might want to check out this article on 6 Julia Frameworks to Create Desktop GUI’s 🖥 and Web Apps.

  • If you are developing your code within an [Jupyter/IJulia] notebook, and need very simple interaction, such as a slider to change some input values, the Interact package is the easiest thing to get started with.
  • To develop full-fledged web UIs, take a look at Escher. Inspired by the Elm, it provides a functional library of UI components. Interactive web UIs are created in 100% Julia. There is no differentiation in code between the client and server sides. The framework handles all of that.
  • Another web framework worth looking at is Genie, which is based on the traditional MVC design pattern. It also includes an ORM.
  • Stipple is a reactive UI library for building interactive data applications in pure Julia. It uses Genie.jl (on the server-side) and Vue.js (on the client).
  • Dash ties modern UI elements like dropdowns, sliders, and graphs directly to your analytical Julia code.
  • All the above solutions are for creating web user interfaces, accessed via a browser. If you want to create cross-platform desktop apps, but want to work with web technologies (i.e. HTML/CSS/Javascript), use Blink. This is a Julia wrapper around the Electron. You could potentially write a Dash or Stipple application, and wrap it in Blink.jl to create a desktop app.
  • To create desktop UI applications using the Gtk library, use the Gtk.jl package in Julia. If you are familiar with the Gtk API, it is easy to get started. Note however that there are some significant known issues running GTK.jl on Windows.
  • If your UI framework of choice is QT, a Julia binding is available via QML.jl
  • If you are happy painting the buffer yourself and just want a window to render the pixels on the screen, then there is nothing simpler than MiniFB. Note however that this does not give you a widget library -- you are responsible for drawing each and every pixel yourself.
  • ClmGui.jl is a Julia wrapper around the immediate mode GUI toolkit known as Dear ImGui
  • And last, but not the least, the venerable Tk framework has a wrapper in Julia. The UI's created using TK are sometimes considered ugly compared with modern aesthetics, but sometimes this is the quickest way to get a window up.

[Edited Jan 2022]

Solution 2

QML.jl https://github.com/barche/QML.jl

The QML.jl package enables using the QML markup language from the Qt library to build graphical user interfaces for Julia programs. The package follows the recommended Qt practices and promotes separation between the GUI code and application logic. All user-facing code is pure Julia and QML, no C++ knowledge is required to use the package.

Solution 3

There is a new package called Genie. It is a web framework comparable with Django in python. You can create web ui using Genie. Until now (Aug. 2017), the package is functional with some nice demos, the documentation is not quite complete though.

Share:
34,269
Admin
Author by

Admin

Updated on January 07, 2022

Comments

  • Admin
    Admin over 2 years

    I'm new at programming in Julia and I need to create a GUI. I've been looking for information and I can't find anything useful. I tried to search information in the Julia official web page, but it seems to be down. I wonder if any of you guys knows where I can find information about it.

  • aviks
    aviks about 4 years
    Tk.jl has recently been revived (Feb 2020)