- Home /
Embedded standalone application in Qt window: communication and automatic resize
Good afternoon, I'm quite new in Unity and I would like to ask two question regarding the integration of the Unity application in a Qt window:
I've implemented the code that embeds the windows standalone app in a Qt window and it works fine. Is there a way to automatically resize the Unity app window by resizing the Qt window?
I need to interact with the Unity scene displayed in the Qt window (for example moving the MainCamera to navigate into the scene or create/destroy objects in the scene) but I haven't found a solution yet. Can anyone tell me the best way to communicate with Unity from the Qt gui? (sharedmemory, localsocket, ...).
As an example, taking into account the example provided in the Unity manual named EmbeddedWindow.zip, I've added a simple script to the MainCamera which rotates it by clicking and moving the mouse and in the embedded window it has effect only if I first resize the window, otherwise the camera doesn't rotate. It seems that the focus of the application is not on the unity window and by resizing the app window the focus goes on it. I have the same problem with my Qt gui but I can't set the focus on the Unity embedded window so I'm not able to interact with theUnity scene.
I hope I've been clear enough. Don't hesitate to ask me clarifications, I'm not an expert.
Thanks in advance