[Qt-interest] QtScript and QML
Paul Drummond
paul.drummond at iode.co.uk
Wed Jan 20 13:11:19 CET 2010
Hi,
It is possible to leverage QtScript code in QML javascript blocks? As a
contrived example, let's say I wanted to do this in a QML file:
Script {
function test() {
f = new QFile();
//operations on f...
}
}
QML complains that QFile doesn't exist which makes sense I guess.
What I really want to do is write the contents of a QML DataModel to a file.
Now, I realise I could do this in C++ but surely if I can do it in C++ then
I should be able to do it in QtScript?
Am I missing something about how to mix QML and QtScript?
Regards,
Paul Drummond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100120/6779b29b/attachment.html
More information about the Qt-interest-old
mailing list