Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15
-
None
Description
For signals with multiple parameters, it seems that you can simply declare the parameters you're interested in (assuming their names match those declared in the signal) and it will work. This should be documented now that they aren't implicitly declared for the user, so that users don't think they need to declare every parameter as in C++.
For example, in qtvirtualkeyboard, there is this signal:
void virtualKeyClicked(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers, bool isAutoRepeat);
Doing the following in QML seems to work fine:
Connections {
target: InputContext.inputEngine
function onVirtualKeyClicked(key, isAutoRepeat) {
// use parameters ...
}
}