show() is called by the main thread, this is true. I don't know what happens to the widget then, but I know for sure that then the run() method starts updating the widget at the rate I wanted and the rendering works fine.
In the meantime I figured out that if I set these flags in the constructor:
SimulatedCamera
::SimulatedCamera(QWidget *parent
) : QGLViewer
(parent
){
setWindowFlags(Qt::CoverWindow);
setAttribute(Qt::WA_DontShowOnScreen);
setAutoBufferSwap(false);
}
SimulatedCamera::SimulatedCamera(QWidget *parent) : QGLViewer(parent)
{
setWindowFlags(Qt::CoverWindow);
setAttribute(Qt::WA_DontShowOnScreen);
setAutoBufferSwap(false);
}
To copy to clipboard, switch view to plain text mode
then the widget is not shown and doesn't spam error messages related to the double buffering. I am not sure how many eyes I made roll with this approach, but it does work perfectly as expected now.
Bookmarks