# Trying to find GUI options for Julia (windows + linux)

**URL:** <https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575>\
**Category:** New to Julia\
**Created:** [September 5, 2018, 10:17am UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575 "2018-09-05T10:17:08Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark/32/5216_2.png) [@mark](https://discourse.julialang.org/u/mark)\
**Post date:** [September 5, 2018, 10:17am UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/1 "2018-09-05T10:17:08Z")

</div>

I’m trying to find out what options there are for creating GUI applications with Julia. When I visit the [Julia Observer GUI category](https://juliaobserver.com/categories/Gui) it lists just 7, some of which are web UIs. It doesn’t list Gtk or any windows native GUI bindings, although I did find that there are Gtk and Tk bindings, although I’m not clear if they support Julia 1 or not.

Has anyone created Julia bindings for [Nuklear (ANSI C GUI library)](https://github.com/vurtun/nuklear)?

I want to use a desktop GUI because I need to be able to access the local filesystem (so users can save and load documents), and also because I want to do _everything_ in one language. And I want to work with Julia 1.

Is there any official Julia project for creating native Julia desktop GUI bindings?

---

<div class="post-metadata">

**Author:** ![waldyrious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/waldyrious/32/80_2.png) [@waldyrious](https://discourse.julialang.org/u/waldyrious)\
**Post date:** [September 5, 2018, 11:14am UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/2 "2018-09-05T11:14:37Z")

</div>

> [@mark](#):
>
> Is there any official Julia project for creating native Julia desktop GUI bindings?

AFAIK the only packages with bindings to a library that use the native GUI widgets of each platform are [Libui.jl](https://github.com/joa-quim/Libui.jl) and [IUP.jl](https://github.com/joa-quim/IUP.jl), both by @joa-quim (not sure why they’re not listed in Package Observer’s listing for GUI packages). For the latter, there’s work in progress by @disciple-of-reason for compatibility with Julia 1.0 – see [this thread](https://discourse.julialang.org/t/work-in-progress-update-of-iup-jl-gui-library-for-v1/13960) for details.

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [September 5, 2018, 11:21am UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/3 "2018-09-05T11:21:50Z")

</div>

Gtk.jl works on v1.0, although there’s probably some issues left to be discovered.

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [September 5, 2018, 12:12pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/4 "2018-09-05T12:12:58Z")

</div>

Blink.jl is a web UI but runs locally in Electron. With Interact.jl its turning into a pretty good solution for my needs, and I’m pretty sure it runs on all platforms. I’m not sure how easy destop-y stuff like file managing is to do with it but its obviously possible to do in atom which is also built on Electron. You can also easily server parts of it on the web with Mux if you need to.

I’m also using Gtk on 1.0 and it runs on all platforms as far as I know.

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark/32/5216_2.png) [@mark](https://discourse.julialang.org/u/mark)\
**Post date:** [September 5, 2018, 12:33pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/5 "2018-09-05T12:33:17Z")

</div>

I tried Gtk on Xubuntu 18.04.1 without success.

I did `add Gtk` at the pkg prompt in Julia 1 and it seemed to pull in a lot of stuff BinDeps … Cairo … Gtk … Unicode and gave no errors.

I then ran the ‘getting started’ example:

```julia
using Gtk

win = GtkWindow("My First Gtk.jl Program", 400, 200)

b = GtkButton("Click Me")
push!(win,b)

showall(win)

```

This produced an error the first time:

```julia
WARNING: Method definition curr_module() in module GLib at /home/mark/.julia/packages/Gtk/b18rN/src/GLib/GLib.jl:31 overwritten in module Gtk at /home/mark/.julia/packages/Gtk/b18rN/src/Gtk.jl:17.

```

but did not show a Window.

When I ran it again, again there was a short pause then nothing. I also tried the second getting started example, and that was the same.

I tried clicking the [Gtk Manual](http://juliagraphics.github.io/Gtk.jl/latest/index.html)’s troubleshooting link but it gave me a 404; same with the precompilation link.

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [September 5, 2018, 12:58pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/6 "2018-09-05T12:58:37Z")

</div>

The warning is expected. There’s been a couple of fixes very recently, so you could try master (`]dev Gtk`), otherwise you can open an issue in the repo. Everything running without error but nothing showing is definitely strange.

---

<div class="post-metadata">

**Author:** ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)\
**Post date:** [September 5, 2018, 1:07pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/7 "2018-09-05T13:07:04Z")

</div>

You can check out [Interact](https://github.com/JuliaGizmos/Interact.jl). It has a `filepicker` widget that uses Electron (if you run it in Blink) to access local file paths, though I still need to add a save button widget (also, it would work in Blink using Electron).

Otherwise Gtk.jl works in Julia 1.0 I think. [QML.jl](https://github.com/barche/QML.jl) is also very nice (to bind to the QT/QML framework) but am not sure whether it works already on Julia 1.0.

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark/32/5216_2.png) [@mark](https://discourse.julialang.org/u/mark)\
**Post date:** [September 5, 2018, 1:17pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/8 "2018-09-05T13:17:49Z")

</div>

I’ve added a comment to [Gtk.jl issue 364](https://github.com/JuliaGraphics/Gtk.jl/issues/364)

Turns out that it is a doc bug: the two ‘getting started’ examples don’t actually work unless you add the ‘non-REPL Usage’ code at the end.

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [September 5, 2018, 1:23pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/9 "2018-09-05T13:23:35Z")

</div>

> [@piever](#):
>
> [QML.jl](https://github.com/barche/QML.jl) is also very nice (to bind to the QT/QML framework) but am not sure whether it works already on Julia 1.0.

It mostly works, but only on my machine 😉 I still need to convert the examples and push what I have to github.

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark/32/5216_2.png) [@mark](https://discourse.julialang.org/u/mark)\
**Post date:** [September 5, 2018, 1:46pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/10 "2018-09-05T13:46:55Z")

</div>

Qt’s licensing is tricky for commercial apps and it is huge, so although I mostly like it a lot, I’m looking elsewhere.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 5, 2018, 1:53pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/11 "2018-09-05T13:53:44Z")

</div>

[Libui.jl](https://github.com/joa-quim/Libui.jl) is very promising (and real small) but it’s a WIP, specially on the [Libui](https://github.com/andlabs/libui) side. Though I’m also trying to gather courage to try implement image display from a very reduced documentation. However, it’s v1.0 ready.

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [September 5, 2018, 2:14pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/12 "2018-09-05T14:14:35Z")

</div>

> [@mark](#):
>
> Qt’s licensing is tricky for commercial apps and it is huge, so although I mostly like it a lot, I’m looking elsewhere.

I think at least for Julia QML.jl-based apps this is not really an issue, since by default only the parts of the library needed for QML will be installed by BinaryBuilder (still have to actually make that work). Qt can be used under LGPL, meaning it is fine to link to it even from a commercial application (QML.jl links to Qt dynamically).

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark/32/5216_2.png) [@mark](https://discourse.julialang.org/u/mark)\
**Post date:** [September 5, 2018, 2:25pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/13 "2018-09-05T14:25:42Z")

</div>

You’re right. I just reread the [Qt LGPL license terms](https://www1.qt.io/qt-licensing-terms/) and they are subtly different from the last time I read and actually easier to comply with. Mind you, I wouldn’t want to use QML (that’s Julia + JavaScript + JSON) so I’d use direct Julia-Qt bindings if available.

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [September 5, 2018, 2:33pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/14 "2018-09-05T14:33:57Z")

</div>

> [@mark](#):
>
> Mind you, I wouldn’t want to use QML (that’s Julia + JavaScript + JSON) so I’d use direct Julia-Qt bindings if available.

I’m not aware of anyone working on that. QML.jl is purely focussed on the QML part, so building a QtWidgets-based application is not possible using it. I chose the QML route mainly because I have the feeling that is the general future direction for Qt, and because you don’t have to wrap things like individual widgets, since those are all directly defined in the QML script.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [September 5, 2018, 2:52pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/15 "2018-09-05T14:52:53Z")

</div>

All this would probably be far easier of [Cxx.jl](https://github.com/Keno/Cxx.jl) were working, robust, and didn’t need specially compiled Julia binaries. It’s rather unfortunate that using C++ from Julia right now involves writing a fair amount of C++ code. Making bindings to something like Qt would probably require an absolutely enormous amount of work.

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [September 5, 2018, 2:56pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/16 "2018-09-05T14:56:32Z")

</div>

It involves C++, it’s never going to be easy 😉

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [November 3, 2018, 11:48pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/17 "2018-11-03T23:48:39Z")

</div>

> [@mark](#):
>
> I wouldn’t want to use QML (that’s Julia + JavaScript + JSON) so I’d use direct Julia-Qt bindings if available.

> <https://github.com/JuliaPy/PyCall.jl/pull/605#issuecomment-434058190>
>
> This PR makes it much easier to work with PyQt from Julia, btw. My main motivati…on was to get Qt slots and signals to work for Julia. PyQt requires that custom signals be assigned to class variables when the class is defined (dynamically added class variables do not work). This PR allows custom Qt signals to be added to classes defined in Julia.

> This PR makes it much easier to work with PyQt from Julia, btw. My main motivation was to get Qt slots and signals to work for Julia. […]

This should help; I don’t know enough about Qt/this or how problematic it is using Qt and doing this with Julia only, but there’s probably no good reason to avoid PyQt and PyCall.jl.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [July 29, 2019, 10:17pm UTC](https://discourse.julialang.org/t/trying-to-find-gui-options-for-julia-windows-linux/14575/18 "2019-07-29T22:17:19Z")

</div>

QML seems to be the way to go; I at least am intrigued by work to extend to to mobile, that Julia could possibly support:  
[https://github.com/barche/QML.jl/issues/62](https://github.com/barche/QML.jl/issues/62)
