Tern QML Demo

# Demo with QML Tern plugin

QML Tern Demo

- test

​x
1

    // Use ctrl-space to complete something

2

    co

3

    document.body.a

4

    ​

5

    // Put the cursor in or after an expression, press ctrl-i to

6

    // find its type

7

    ​

8

    var foo = ["array", "of", "strings"]

9

    var bar = foo.slice(0, 2).join("").split("a")[0]

10

    ​

11

    // Works for locally defined types too.

12

    ​

13

    function CTor() { this.size = 10 }

14

    CTor.prototype.hallo = "hallo"

15

    ​

16

    var baz = new CTor

17

    baz.

18

    ​

19

    // You can press ctrl-q when the cursor is on a variable

20

    // name to rename it. Try it with CTor...

21

    ​

22

    // When the cursor is in an argument list, the arguments

23

    // are shown below the editor.

24

    ​

25

    [1].reduce(  )

26

    ​

    MyButton {

    }

    Button {
    	property int width;
    	property int height;
    	property var parent;
    }