|
Hello, can you give me an advice how I could connect signals by childs to my C++-implementation? I have following QML-structure: [QML] // Service.qml Item { id: service; signal serviceIndicatorClicked(int index); Rectangle { id: serviceIndicator; ... MouseArea { anchors.fill: parent; acceptedButtons: Qt.LeftButton; onClicked: { serviceIndicatorClicked(index); } } } } // Host.qml Rectangle { id: hostItem; Service { ... } } [/QML] I try to connect this signal with following lines: [CPP] connect(objectHost, SIGNAL(serviceIndicatorClicked(int)), this, SLOT(serviceIndicatorClicked(int))); [/CPP] Then my result is: [OUTPUT] Object::connect: No such signal Host_QMLTYPE_1::serviceIndicatorClicked(int) Object::connect: (receiver name: 'MainWindow') [/OUTPUT]Of course, this makes sense to me, because the signal of the child is not visible and not part of Host, right? Is there an easy way to use this signal? Cheers, Christian |
_______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
