[Interest] QML FS? Node.JS's 'fs'?

Daniel França daniel.franca at gmail.com
Thu Feb 12 21:19:07 CET 2015


I was curious about that too.
I want to use some ORM library with QML (or create my own)... so I did a
quick research which gave me this Ubuntu SDK page, explaining what work or
not on QML Javascript environment:
http://developer.ubuntu.com/api/qml/sdk-1.0/QtQml.qtqml-javascript-hostenvironment/

Basically QML supports the specification on ECMA script, but doesn't
support browser specific stuff, like DOM or window object, and doesn't
support any change on the global object (i.e.: no undeclared vars).

To manage this and be able to import third-party libraries there's this bug
report: https://bugreports.qt.io/browse/QTBUG-22356
Still open, but with some ideas and workarounds.

And there's this attempt to support CommonJS on QML:
https://github.com/grassator/qml-commonjs
The bad thing for you is that the fs is not working yet.
But you can have a look on it and see if it's possible to adapt it easier.

Let me know if you've any progress.

Daniel.

Em Thu Feb 12 2015 at 5:19:57 PM, Jason H <jhihn at gmx.com> escreveu:

> So I want to do some elementary fs stuff. Mainly a delete. I was hoping
> there was an existing QML library to do this?
>
> Also, since QML is JS, and Node is JS, I would be fine with using Node's
> js module, but I am not sure how compatible the environments are.
>
> Node and QML are quite the pair!
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150212/0b8bc0a2/attachment.html>


More information about the Interest mailing list