QML Scripting...
-
Is QML like a normal scripting language ? What I’m asking is… Is it general purpose ?
Like, can I do anything in it just like I would use any other scripting language ?
Things, like Flow control, User defined types, File IO, etc…
What type of scripting work is QML not really made for ?I can’t find a good getting started tutorial about how to compile/execute a QML script.
Thanks,
-
Hi,
QJSEngine would be a good starting point. You can also take some inspiration from the QtScript module
Hope it helps
-
Hi,
@arealperson said:
Is QML like a normal scripting language ? What I’m asking is… Is it general purpose ?
In the beginning, QML was designed as a quick and easy language to create GUIs. It consists of JavaScript plus custom declarative code which is similar to CSS/JSON.
Since QML is a superset of JavaScript, you can use its engine for JavaScript scripting.
QML is general-purpose. It is even used to implement a build system.
Like, can I do anything in it just like I would use any other scripting language ?
Things, like Flow control, User defined types, File IO, etc…
What type of scripting work is QML not really made for ?Well... anything that's not suitable for JavaScript, I guess.
I can’t find a good getting started tutorial about how to compile/execute a QML script.