3
votes

My code runs fine as expected but why do I get the warning messsage:

QML Connections: Cannot assign to non-existent property "onValueChanged"

Here is how I linking to signal.

Connections {
    target: myModel
    onValueChanged: {
        console.log("Valued changedRecieved in QML")
    }

myModel is a C++ class that I am exposing to QML using engine.rootContext()->setContextProperty("myModel", &model);

Is there a way to remove this warning?

1
Does your model have a valueChanged signal? Because QAbstractItemModel doesn't. - cmannett85
Yes it does and and qml code does catch that signal and process it but its the warning message which is annoying. - zar
When does the message appear? - cmannett85
Maybe is printed initially when the qml is loaded and you export myModel only afterwards? - Frank Osterfeld
You should show us your main.cpp; you'd probably have had an answer by now. ;) - Mitch

1 Answers

1
votes

In your Connections scope just set ignoreUnknownSignals: true