Skip to content

Commit

Permalink
engine::setImportPathList method
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelvasev committed Mar 2, 2015
1 parent bc1ba46 commit d3b575c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/qtcore.js
Expand Up @@ -797,11 +797,21 @@ QMLEngine = function (element, options) {
}
return this.$basePath + file;
}

// next 3 methods used in Qt.createComponent for qml files lookup
// please open qt site for documentation
// http://doc.qt.io/qt-5/qqmlengine.html#addImportPath

this.addImportPath = function( dirpath ) {
if (!this.userAddedLibraryPaths) this.userAddedImportPaths = [];
this.userAddedImportPaths.push( dirpath );
}

this.setImportPathList = function( arrayOfDirs )
{
this.userAddedImportPaths = arrayOfDirs;
}

this.importPathList = function() {
return (this.userAddedImportPaths || []);
}
Expand Down

0 comments on commit d3b575c

Please sign in to comment.