The current code doesn't make any sense, you are passing the window ID into the wrong direction.

The child application needs to determine its window's ID and send it to the host application.
The host then needs to wrap it in a QWindow using fromWinId() and then put that window into its widget tree by using createWindowContainer()

Cheers,
_