import QtQuick 2.5 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 import QtQml 2.12 ApplicationWindow { id: appWindow visible: true width: 200 height: 100 title: qsTr("QML Connections Test") Button { text: "Start" onClicked: { console.log("Start clicked") cppObject.startTest() } } Connections { target: cppObject // CASE 1 - both old form - works, but there is a deprecation warning // onPropOneChanged: console.log("onPropOneChanged:") // onPropTwoChanged: console.log("onPropTwoChanged:") // CASE 2 - both new form - works function onPropOneChanged() { console.log("function onPropOneChanged()") } function onPropTwoChanged() { console.log("function onPropTwoChanged()") } // CASE 3a - mixed - only old form works (PropOne) // onPropOneChanged: console.log("onPropOneChanged:") // function onPropTwoChanged() { console.log("function onPropTwoChanged()") } // CASE 3b - mixed - only old form works (PropTwo) // function onPropOneChanged() { console.log("function onPropOneChanged()") } // onPropTwoChanged: console.log("onPropTwoChanged:") } }