My main window is creating another window displayed on a second screen
ApplicationWindow {
id: mainWindow
property var customerUi
Component.onCompleted: {
customerUi = customerWindow.createObject()
if (ScreenManager.screenCount() > 1)
ScreenManager.setScreen(customerUi, 1)
}
}
Both window need to display a video of the same camera (it is actually a live feed from a usb adaptor, but it works the same)
Camera {
id: camera
deviceId: "my_device"
}
VideoOutput {
source: camera
}
It works fine in one window, but the second window never show the video. I guess because the Camera handle cannot be grabbed by two interface at the same time (or something like that)
I tried creating only one Camera, and two VideoOutput using the same source but it doesn't work either.
I tried to duplicate the view using a ShaderEffect, but
ShaderEffectSource: sourceItem and ShaderEffectSource must both be children of the same window
How can I display the video on both window at the same time ?
EDIT :
Apparently it was possible in Qt 5.3 using ShaderEffectSource https://bugreports.qt.io/browse/QTBUG-43117
But I'm need to make it work with Qt 5.5.1
EDIT 2 :
Duplicating the Video in the same window works fine using ShaderEffectSource, the problem is only to put it in another window.