Qt Quick Underscore.js
Jump to navigation
Jump to search
Using Underscore.js library in Qt Quick
Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
(http://underscorejs.org/)
Unfortunately you cannot just import Underscore like:
due immutable root object [qt.io]
The workaround is to modify underscore.js so that it returned underscore object via special init function.
This is a diff output for Underscore.js version 1.4.4:
Now you can use it in your project:
Drawback of this approach is the following warning in application console: