<p>I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL.</p>

<p>My first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run the simulation inside the editor. <strong>This means I also have to share the simulation code which uses SDL threads.</strong></p>

<p>So, my question is this: Is there a way to have an the render OpenGL to a Qt window by using SDL?</p>

<p>I have read on the web that it might be possible to supply SDL with a window handle in which to render. Anybody has experience dong that?</p>

<p>Also, the threaded part of the simulator might pose a problem since it uses SDL threads.</p>

Rendering onto opengl from QT is trivial (and works very well)
No direct experience of SDL but there is an example app here about mixing them.
http://www.devolution.com/pipermail/sdl/2003-January/051805.html
There is a good article about mixing QT widgewts directly with the opengl here
http://doc.trolltech.com/qq/qq26-openglcanvas.html
a bit beyond what you strictly need but rather clever!