You are on page 1of 14

JavaScript (aka ECMAScript)

Tod Gentille
www.syncorsystems.com
@todgentille
JavaScript
JavaScript
Understanding

Learn JavaScript to fully


Any C like language for
exploit QML only
basic comprehension
applications
Learn JavaScript to
fully exploit QML only
applications
Major Differences
No DOM

Qt Global Object

qsTr

.arg modification to Strings

console/print

XMLHttpRequest
Subtle Differences

QML is more “this” is not


strict ubiquitous
• no global • prefer
namespace explicit ids
pollution
Where

Property Signal
bindings handlers

Standalone Imported
custom from .js
methods files
Property Assignment
Ternary Operator
Property Assignment
Single line if/else
Property Assignment
Multiple line if/else
Property Assignment
Standalone function
Summary
« JavaScriptinQMLhassome differences

« inline,standalone,andJSresource files

« ImportingsyntaxandQt.include()

« Qt.binding()

You might also like