PDA

View Full Version : QML Signal handling



nestuser
16th October 2012, 08:03
Hi, I loaded 1 Qml file using qdecllarativeView and send signals to that Qml file from cpp.
At the QML side I received the signal correctly. Then I closed that qml and loaded another one and send the same signal. Now I'm not getting that signal in the second qml and also getting it in the fist qml.. How can I disconnect signals correctly. my sample code is :


view = new QDeclarativeView();
view->setSource(QUrl::fromLocalFile(filename));
view->show();
Qmlview->close();
Qmlview = view;
update();
emit signal_object2(value);

and at the qml side :


Connections
{
target: linkFile
onSignal_object2:
{
console.log("Got event ## ## onSignal_object1:")
}
}