# Julia & PyQt

**URL:** <https://discourse.julialang.org/t/julia-pyqt/44426>\
**Category:** New to Julia\
**Created:** [August 6, 2020, 4:03pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426 "2020-08-06T16:03:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gour](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gour/32/2007_2.png) [@gour](https://discourse.julialang.org/u/gour)\
**Post date:** [August 6, 2020, 4:03pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/1 "2020-08-06T16:03:30Z")

</div>

Hello,

I consider that PyQt (or PySide) is the best option for my open-source & multi-platform desktop project…however, Julia as language is very attractive and, afaics, there is possibility to use it via [PyCall.jl](https://github.com/JuliaPy/PyCall.jl) package, but I wonder how one does use `PyCall` to use PyQt, iow. is it similar to using Julia and calling 3rd party C library by using FFI, or using `PyQt` would bring to me the “two language problem” - I’d have to write gui front-end using Python and do back-end programming using Julia?

Do you recommend such approach or is it better to simply do everything in Python and use e.g Cython to speed up Python code when/if required?

I am aware that there is e.g. [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl) and although I’m running GTK-powered desktop (Xfce), GTK, in general seems to be not so well documented besides more problematic to deploy on Mac/Win OS-es…

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 6, 2020, 4:27pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/2 "2020-08-06T16:27:27Z")

</div>

> [@gour](#):
>
> is it similar to using Julia and calling 3rd party C library by using FFI, or using `PyQt` would bring to me the “two language problem” - I’d have to write gui front-end using Python and do back-end programming using Julia?

You can write everything in Julia. It should be easier than calling a C library, for the most part, because it’s much higher-level. You do need to know how to read the Python documentation and translate it to the corresponding call from Julia via PyCall.

> [@gour](#):
>
> I am aware that there is e.g. [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl) and although I’m running GTK-powered desktop (Xfce), GTK, in general seems to be not soe well documented besides more problematic to deploy on Mac/Win OS-es…

Gtk.jl uses [Yggdrasil](https://github.com/JuliaPackaging/Yggdrasil) to provide precompiled binaries for Mac and Windows, so deployment should not be as hard as you think — simply adding a package that depends on Gtk.jl should install all of the necessary libraries AFAIK.

---

<div class="post-metadata">

**Author:** ![gour](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gour/32/2007_2.png) [@gour](https://discourse.julialang.org/u/gour)\
**Post date:** [August 6, 2020, 4:35pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/3 "2020-08-06T16:35:26Z")

</div>

> [@stevengj](#):
>
> You can write everything in Julia. It should be easier than calling a C library, for the most part, because it’s much higher-level.

That’s great!!

> [@](#):
>
> You do need to know how to read the Python documentation and translate it to the corresponding call from Julia via PyCall.

Wonderful! it means I can also take advantage of some PyQt book…

> [@](#):
>
> …so deployment should not be as hard as you think…

What about “general” build system for Julia project which requires e.g. bindings for 3rd party C library, building docs etc.?

Does Julia already have ability to create stand-alone executable?

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [August 6, 2020, 4:42pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/4 "2020-08-06T16:42:36Z")

</div>

If you really like Qt (and I can understand why), maybe consider to have a look at [QML.jl](https://github.com/barche/QML.jl) which is probably the most straightforward option to build a Qt app with Julia and QML.

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [August 6, 2020, 5:15pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/5 "2020-08-06T17:15:34Z")

</div>

Depending on your needs, you can also use [GitHub - Gnimuc/CImGui.jl: Julia wrapper for cimgui](https://github.com/Gnimuc/CImGui.jl).  
It’s blazing fast, installation is straightforward and examples are very useful.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 6, 2020, 6:02pm UTC](https://discourse.julialang.org/t/julia-pyqt/44426/6 "2020-08-06T18:02:05Z")

</div>

> [@gour](#):
>
> What about “general” build system for Julia project which requires e.g. bindings for 3rd party C library, building docs etc.?

BinaryBuilder.jl and Yggdrassil can be used to create cross-platform builds of any 3rd-party C library that integrate with Julia’s package system (so that they are automatically installed as dependencies along with your project). Documenter.jl and friends are used for building docs.

> [@gour](#):
>
> Does Julia already have ability to create stand-alone executable?

[PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) can do this. Note, however, that this is somewhat orthogonal to the questions above — the normal way to distribute Julia software is as packages, so that Julia users can then just type `add YourPackage` to install your package and all of its dependencies.

---

<div class="post-metadata">

**Author:** ![gour](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gour/32/2007_2.png) [@gour](https://discourse.julialang.org/u/gour)\
**Post date:** [August 7, 2020, 9:37am UTC](https://discourse.julialang.org/t/julia-pyqt/44426/7 "2020-08-07T09:37:39Z")

</div>

> [@fbanning](#):
>
> If you really like Qt (and I can understand why),

Well, not so many options actually…if one does eliminate Electron and similar stuff…

> [@](#):
>
> maybe consider to have a look at [QML.jl](https://github.com/barche/QML.jl) which is probably the most straightforward option to build a Qt app with Julia and QML.

I’ll take a look…not sure what would be QML’s pro/cons in regard to using pure (Py)Qt?

---

<div class="post-metadata">

**Author:** ![gour](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gour/32/2007_2.png) [@gour](https://discourse.julialang.org/u/gour)\
**Post date:** [August 7, 2020, 9:40am UTC](https://discourse.julialang.org/t/julia-pyqt/44426/8 "2020-08-07T09:40:30Z")

</div>

> [@Iulian.Cioarca](#):
>
> Depending on your needs, you can also use [GitHub - Gnimuc/CImGui.jl: Julia wrapper for cimgui](https://github.com/Gnimuc/CImGui.jl).  
> It’s blazing fast, installation is straightforward and examples are very useful.

I must admit it looks interesting, but I’m a bit concerned how mature it is…my project has possibility to be developed during the longer period of time and that’s why I’m aiming at more stable and future-proof solutions…

---

<div class="post-metadata">

**Author:** ![gour](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gour/32/2007_2.png) [@gour](https://discourse.julialang.org/u/gour)\
**Post date:** [August 7, 2020, 9:45am UTC](https://discourse.julialang.org/t/julia-pyqt/44426/9 "2020-08-07T09:45:17Z")

</div>

> [@stevengj](#):
>
> BinaryBuilder.jl and Yggdrassil can be used to create cross-platform builds of any 3rd-party C library that integrate with Julia’s package system (so that they are automatically installed as dependencies along with your project). Documenter.jl and friends are used for building docs.

Thanks a lot for all the pointers! It looks pretty good.

What is the prospect of running Julia GUI app on e.g. Android?

I know there is [pyqtdeploy](https://www.riverbankcomputing.com/software/pyqtdeploy/) so wonder how would choosing Julia+PyQt over just PyQt influence ability to deploy on e.g. Android platform?
