This caught my eye when looking at examples in the qt-components project
[1]. It looks like 'return' can be used to return a value from a script
block:
Text {
text: { if (condition) {
return "A";
}
return "B";
}
}
My JavaScript knowledge is pretty much nonexistent, but cursory googling
would suggest that in JavaScript, a return statement can only be used
inside functions. Is the above syntax an extension of JavaScript, and if
so, is it documented somewhere?
[1] <http://qt.gitorious.org/qt-components/qt-components>
--
Pertti
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml