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 :
Qt Code:
  1. view = new QDeclarativeView();
  2. view->setSource(QUrl::fromLocalFile(filename));
  3. view->show();
  4. Qmlview->close();
  5. Qmlview = view;
  6. update();
  7. emit signal_object2(value);
To copy to clipboard, switch view to plain text mode 
and at the qml side :
Qt Code:
  1. Connections
  2. {
  3. target: linkFile
  4. onSignal_object2:
  5. {
  6. console.log("Got event ## ## onSignal_object1:")
  7. }
  8. }
To copy to clipboard, switch view to plain text mode