qt - What is the best way to implement a inter-qwebview communication? -
overview:
i trying create poc application mimics webintents-like feature. so, in qt application, create 2 qwebviews launching 2 different webapps. let's call them apps , b.
scenario:
- main application creates 2 qwebviews each launching app i.e. appa, appb.
- app programmed fetch data via ajax, automatically.
- app b needs part of data. appb displays button (html) called . note: since, appa has info, appb invoke javascript api injected it's(appb) dom means of addtojavascriptwindowobject() method call when qwebview launched.
- app-a completed ajax call , indicates completion in webview.
- user clicks button in appb,
- app b invokes javascript api i.e. fetcdata({source: "appa");
- now control in qt-world:
question: control in context of appb, how should communicate webview in appa -- i.e. appb asks appa: hey appa, please give me data have fetched?
can signals , slots me here? or should use other form of ipc.
i read page: http://qt-project.org/doc/qt-4.8/qtwebkit-bridge.html, still didn't hint solution problem.
another related question: qwebviews created in own threads ?