An open API service indexing awesome lists of open source software.

https://github.com/diro/qml_underscorejs

Underscore.js for QML
https://github.com/diro/qml_underscorejs

Last synced: 14 days ago
JSON representation

Underscore.js for QML

Awesome Lists containing this project

README

          

# qml_underscorejs
A port of underscore.js to Qt/QML.
The original Underscore. js will attach _ object to this object , but in QML we cannot add global object.
Please refer to:
http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html#javascript-environment-restrictions

In this port, we attach _ object to the global object Qt, and then you could use all the underscore.js function in your QML.

# example
import "underscore.js" as Underscore
Item
{
...
enabled: Qt._.every([inptBoxIP, inptBoxUser, inptBoxPassword],
function f(e) {
return e.text !== ""
})
...
}