Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

QML Engine Internals, Part 1: QML File Loading

import QtQuick 2.0

Rectangle {
    id: root
    width: 360
    height: width + 50
    color: "lightsteelblue"
    property alias myWidth: root.width
    property int counter: 1

    function reactToClick() {
        root.counter++
    }

    Text {
        id: text
        text: qsTr("Hello World: " + counter)
        anchors.centerIn: parent
    }

    MouseArea {
        id: mouseArea
        anchors.fill: parent
        onClicked: {
            reactToClick()
        }
    }
}

This was generated by graphviz using a dotfile produced with the patch at http://www.kdab.com/~thomas/stuff/ast-graph.diff

Index           Operation               Data1   Data2   Data3   Comments
-------------------------------------------------------------------------------
0               INIT                    4       3       0       0
1               INIT_V8_BINDING 0       17
2               CREATECPP                       0
3               STORE_META
4               SETID                   0                       "root"
5               BEGIN                   16
6               STORE_INTEGER           45      1
7               STORE_COLOR             41                      "ffb0c4de"
8               STORE_COMPILED_BINDING  10      2       0
9               STORE_DOUBLE            9       360
10              FETCH_QLIST             2
11              CREATE_SIMPLE           32
12              SETID                   1                       "text"
13              BEGIN                   16
14              STORE_V8_BINDING        43      0       0
15              FETCH                   19
16              STORE_COMPILED_BINDING  17      1       1
17              POP
18              STORE_OBJECT_QLIST
19              CREATE_SIMPLE           32
20              SETID                   2                       "mouseArea"
21              BEGIN                   16
22              STORE_SIGNAL            42      2
23              FETCH                   19
24              STORE_COMPILED_BINDING  16      0       1
25              POP
26              STORE_OBJECT_QLIST
27              POP_QLIST
28              SET_DEFAULT
29              DONE
-------------------------------------------------------------------------------

13 Comments

27 - Jul - 2012

Eduardo Robles Elvir

27 - Jul - 2012

Laszlo Papp

28 - Jul - 2012

Timur Kristóf

11 - Aug - 2012

charley

13 - Sept - 2012

Laszlo Papp

13 - Sept - 2012

Thomas McGuire

13 - Sept - 2012

Raul Guerrero

13 - Sept - 2012

Thomas McGuire

28 - Sept - 2012

Kacper Gazda

4 - Nov - 2014

dyamsu

5 - Nov - 2014

Thomas McGuire

29 - Jan - 2015

Li Qaul

29 - Jan - 2015

Thomas McGuire