Can we make Gui using Qt creator in Julia?

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

You can create a GUI based on Qt using 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.

1 Like

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> 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

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. :slight_smile:

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.

1 Like
oh i understand

:slight_smile: when loading

load("main.qml")

It gave above error but when running

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

works
but


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 :slight_smile:
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 :frowning: , 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

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):

import QtQuick 2.9
import QtQuick.Window 2.2

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

Thank you.
I have this version in qml

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

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

:slight_smile: 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. :slight_smile:

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

But you need to create a QT account first …

1 Like

:slight_smile: HI , I’ve made qt account and created a bug report
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 :slight_smile:

Hi :slight_smile: 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. ? 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.