03-05-2014 01:02 PM
Thanks very much.
Solved! Go to Solution.
03-06-2014 11:14 AM - edited 03-06-2014 11:15 AM
You cannot call qml code of your UI or any code of your UI directly from the headless app. The headless portion runs in its own process. There are however a few ways to enable communication between the headless and the UI portion:
1. Invocation framework.: UI can invoke the headless directly but headless caanot invoke the UI. So essentially this is a one way communication if that's what you need.
2. Local sockets: whenever the UI is launched, it can connect to the headless via local sockets and have a 2 way chat with each other.
3. FileSystem: This is also 2-way. Headless can write something to a file and the UI can listen for changes via QFileSystemWatcher and vice versa.
As stated above, you can communicate between the two but if you are looking for using application logics, algorithms, functions of each other, that is not possible. They are independent applications packaged in the same bar file.
03-07-2014 12:46 AM
Thank for your help
So it's not possible.
Excuse me but all work of my application is done by js function and qml.
Can I but a js function in *.js or *.qml file in headless part of my application project and call it from c++ file existing in headless part?
Please help me; Thanks
03-07-2014 02:36 AM
03-07-2014 03:46 AM
If I have understand all: headless part of application in BB10 can't content qml file but only c++?
Can you confirm that?
If yes that main I must rewrite completely my application that have took me many months to finished it!!!!!
03-07-2014 03:49 AM
03-07-2014 04:35 AM