Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML Scripting...
Forum Updated to NodeBB v4.3 + New Features

QML Scripting...

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 953 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arealperson
    wrote on last edited by
    #1

    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,

    JKSHJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QJSEngine would be a good starting point. You can also take some inspiration from the QtScript module

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A arealperson

        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,

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        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.

        • http://doc.qt.io/qt-5/topics-scripting.html
        • http://doc.qt.io/qt-5/qtjavascript.html

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved