[Qt-interest] Is "on" a QML keyword?

charles.yin at nokia.com charles.yin at nokia.com
Tue Jun 28 01:23:21 CEST 2011


QML automatically creates onSomePropertyChanged kinds of slots for all QObject properties which have notify signals. So you can write code like this:

Rectangle {
   onXChanged : { console.log("x:" + x}
   onYChanged : { console.log("y:" + y}
}

I guess (probably wrong) that's why qt creator puts  "on" into the keyword list.

Cheers
Charles
________________________________________
From: qt-interest-bounces+charles.yin=nokia.com at qt.nokia.com [qt-interest-bounces+charles.yin=nokia.com at qt.nokia.com] on behalf of ext NoRulez [norulez at me.com]
Sent: Tuesday, 28 June 2011 1:30 AM
To: Qt Interest MailingList
Subject: [Qt-interest] Is "on" a QML keyword?

Hi,

in the Qt-Creator code I found the keyword "on" in qmllexer.cpp:163 (findReservedWord() => T_ON)

Is this a QML keyword, because in JavaScript it doesn't exist?

Does a list of QML keywords exist?

Thanks in advance

Best Regards
NoRulez
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list