-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properties passed to loadqml
makes app to crash when loaded from module
#165
Comments
Can you replicate the issue with QML 0.8? |
Yes, I just tested it with Julia 1.9.2 and QML 0.8. The error is still there. |
Which operating system are you using? |
MacOS 14 on Apple silicon. I will check it later on Ubuntu. |
I can report that the problem persists when using Ubuntu 22.10 with Julia 1.9.3 and the current QML 0.8 version. |
The reason for this is that |
The new documentation at https://juliagraphics.github.io/QML.jl/dev/#Using-QML.jl-inside-another-Julia-module should make this clearer, so I'm closing this. |
This makes sense. Another workaround I just tested is that one can define the relevant global variables in the
This makes it easier to structure larger applications where passing multiple properties to every function would be cumbersome. It also seems necessary for processing signals on the Julia side, which updates the model and ultimately from which QML redraws the view. |
Indeed, good solution! |
In the current master version of QML, in a situation where an application code is placed within a module exposing a
julia_main
function to start the application, there happens to be a crash when thisjulia_main
function is called. As an example, consider the following:When called from a module with
using QMLApp; QMLApp.julia_main()
a following error happens:This error does not happen if the
_PROPERTIES
are not passed toloadqml
. Also, interestingly, the code works fine when the module is included within a file likeinclude("src/QMLApp.jl"); QMLApp.julia_main()
.A full self-contained example is available at https://github.com/JanisErdmanis/QMLAppTest/tree/julia_main_bug
The text was updated successfully, but these errors were encountered: