On 16 June 2015 at 19:28, Kurt Pattyn <[email protected]> wrote: > Well, > > you can also think of “on” + <event>, like in: onWindowClosed, > onMouseClicked, onBytesReceived, … > In the same analogy, you could have onErrorOccurred. > > Seems very intuitive to me. > > It depends if you want to react to a state or to the event causing that state.
The QML spec says "on" + <signal>, not <state>: http://doc.qt.io/qt-5/qtqml-syntax-signals.html#receiving-signals-with-signal-handlers You can call connect() on the thing after "on": http://doc.qt.io/qt-5/qtqml-syntax-signals.html#connecting-signals-to-methods-and-signals The thing after "on" is also exposed to C++ as a signal; it can be passed to QObject::connect() in the SIGNAL() macro. So, we need to use signal names (which are past tense verbs). Regards, Sze-Howe _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
