# Can we make Gui using Qt creator in Julia?

**URL:** <https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787>\
**Category:** New to Julia\
**Created:** [December 14, 2020, 3:55am UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787 "2020-12-14T03:55:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 14, 2020, 3:55am UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/1 "2020-12-14T03:55:40Z")

</div>

Hello guys,

how can i make GUI desktop applications in Julia through the use of Qt creator?  
I’ve seen making gui in julia but not using Qt creator.  
I am thinking if there is way to build.

Thank you

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 14, 2020, 9:32am UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/2 "2020-12-14T09:32:09Z")

</div>

You can create a GUI based on Qt using [https://github.com/barche/QML.jl](https://github.com/barche/QML.jl) I think you can do the GUI design of QML forms with Qt Creator, but I did not try it. Please report if it works for you if you try it.

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 14, 2020, 10:00am UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/3 "2020-12-14T10:00:04Z")

</div>

> [@ufechner7](#):
>
> do the GUI design of QML forms with Qt Creator

It is command line based. After adding QML , I’ve gone to qt creator if there was no julia languages in list, it didnt shown.

I also tried in command line but throws error in

```julia

julia> load("main.qml")

```

> ERROR: Existing engine, aborting creation  
> Stacktrace:  
> [1] init\_qmlapplicationengine at /home/vedasulo/.julia/packages/CxxWrap/ZOkSN/src/CxxWrap.jl:590 [inlined]  
> [2] load(::FileIO.File{FileIO.DataFormat{:QML}}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/vedasulo/.julia/packages/QML/AvdBY/src/QML.jl:57  
> [3] load at /home/vedasulo/.julia/packages/QML/AvdBY/src/QML.jl:57 [inlined]  
> [4] load(::String; options::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/vedasulo/.julia/packages/FileIO/TyKdX/src/loadsave.jl:136  
> [5] load(::String) at /home/vedasulo/.julia/packages/FileIO/TyKdX/src/loadsave.jl:136  
> [6] top-level scope at REPL[9]:1

edit:  
Although this error I tried to use others command

```julia
qview = init_qquickview()
set_source(qview, "main.qml")
QML.show(qview)
exec()

```

and these worked. GUI was shown.  
Although i am searching julia QML to use in qt creator ,to develop gui apps. 🙂

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 14, 2020, 2:24pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/4 "2020-12-14T14:24:50Z")

</div>

Well, you can just create a new “Qt quick” project in QT creator.  
Give it a name, and it will show a file “main.qml”.

Did you try to open this file in julia?

You might have to adapt the file path.

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 14, 2020, 2:52pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/5 "2020-12-14T14:52:16Z")

</div>

> **oh i understand**
>
> 🙂 when loading
> 
> ```julia
> load("main.qml")
> 
> ```
> 
> It gave above error but when running
> 
> ```julia
> 
> ```
> 
> ```julia
> qview = init_qquickview()
> set_source(qview, "main.qml")
> QML.show(qview)
> exec()
> 
> ```
> 
> works  
> but
> 
> ```julia
> 
> set_source(qview, "main.qml")
> 
> ```
> 
> gave some error  
> `ERROR: MethodError: no method matching set_source(::CxxWrap.CxxWrapCore.CxxPtr{QML.QQuickView}, ::String)`
> 
> but when running box appear.
> 
> I

After making `main.qml` i have to open it through julia 🙂  
I created than and simlar to successfully opened windows but, go crashed while loading giving this error  
` CxxWrap.CxxWrapCore.CxxPtr{QML.QQmlApplicationEngine}(Ptr{QML.QQmlApplicationEngine} @0x000055f51d2f2750)`

but ☹ , I wanted to design in qt\_creator , like it would create guis and make julia codes onto itself (like it does for c++ all creating classes and things).

Thank you

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 14, 2020, 3:45pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/6 "2020-12-14T15:45:51Z")

</div>

Well, you can design a qml form in QT creator. Just click on the button “Design” on the left.

Ok, the crash needs to be fixed, but I guess that is related to the versions of the files that  
get imported. I have (old version of qt creator):

```julia
import QtQuick 2.9
import QtQuick.Window 2.2

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
}

```

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 14, 2020, 4:44pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/7 "2020-12-14T16:44:51Z")

</div>

Thank you.  
I have this version in qml

```julia
import QtQuick 2.10
import QtQuick.Window 2.10

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
}

```

I converted to your version but still got error saying  
`CxxWrap.CxxWrapCore.CxxPtr{QML.QQmlApplicationEngine}(Ptr{QML.QQmlApplicationEngine} @0x000055db6ea690b0)`

Following through github when adding  
`import org.julialang 1.0`

got problem  
```QML module not found``  
got answer but quite

```julia
Yes, you can't load the Julia support from Qt Creator, you need to start the QML application from within Julia, then the org.julialang module will be available on the QML side, e.g:

using QML
load("qmlfile.qml")
exec()

```

I wanted to build fully fledge gui software for my project instead of using python gui or c++ gui.

Would i able to do that ?  
Thank you

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 21, 2020, 5:04pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/8 "2020-12-21T17:04:54Z")

</div>

🙂 I am looking for `julia` available in `qt creator` officially so that we could make `gui` applications with `drag and drop` support within qt creator.  
My problem would be solved if it is happened. 🙂

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 21, 2020, 5:10pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/9 "2020-12-21T17:10:46Z")

</div>

Well, then file an issue to QtCreator… Building GUIs for Julia with QT Creator using drag and drop is already possible, just not as straightforward as you would like to have it.

See here: [System Dashboard - Qt Bug Tracker](https://bugreports.qt.io/secure/Dashboard.jspa)

But you need to create a QT account first …

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 21, 2020, 5:36pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/10 "2020-12-21T17:36:18Z")

</div>

🙂 HI , I’ve made qt account and created a bug report  
[https://bugreports.qt.io/browse/QTCREATORBUG-25160](https://bugreports.qt.io/browse/QTCREATORBUG-25160)

I hope they would officially support as soon as possible.

I am also thinking

_How is current development of julia in GUI development? Is it in stage to be as powerful as c++ in gui development?_  
Like in c++ , people made alot of things like browser, operating systems apps, mobile apps also 🙂

---

<div class="post-metadata">

**Author:** ![vedasulo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vedasulo/32/20324_2.png) [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Post date:** [December 22, 2020, 4:41pm UTC](https://discourse.julialang.org/t/can-we-make-gui-using-qt-creator-in-julia/51787/11 "2020-12-22T16:41:51Z")

</div>

Hi 🙂 They replied me to make `plugins` for julia to automatically support qt creator in julia. Although they also told to make my own which is quite hard. But may be i can do it .

> You can use a “generic project” (New \> Project \> Import \> Import existing project) to create a Qt Creator project from your existing sources (if you don’t just want to open individual files), and register a language server for Julia ([GitHub - julia-vscode/LanguageServer.jl: An implementation of the Microsoft Language Server Protocol for the Julia language.](https://github.com/julia-vscode/LanguageServer.jl) ? Tools \> Options \> Language Client). When you open a .jl file, Qt Creator will suggest to you to download a highlighting description file (uses KDE/Kate’s syntax highlighting framework).  
> Set up custom commands for building and running in Projects mode.
> 
> **Everything else is out of scope, except if someone happens to write a plugin for it.**
