diff options
Diffstat (limited to 'demos/declarative/snake')
-rw-r--r-- | demos/declarative/snake/content/snake.js | 4 | ||||
-rw-r--r-- | demos/declarative/snake/snake.qmlproject | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index 12176c7..2457fbd 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -5,8 +5,8 @@ var links = new Array; var scheduledDirections = new Array; var numRows = 1; var numColumns = 1; -var linkComponent = createComponent("content/Link.qml"); // XXX should resolve relative to script, not component -var cookieComponent = createComponent("content/Cookie.qml"); +var linkComponent = Qt.createComponent("content/Link.qml"); // XXX should resolve relative to script, not component +var cookieComponent = Qt.createComponent("content/Cookie.qml"); var cookie; var linksToGrow = 0; var linksToDie = 0; diff --git a/demos/declarative/snake/snake.qmlproject b/demos/declarative/snake/snake.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/snake/snake.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} |