<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>I'm trying to make a QOpenGLWidget based VTK widget, and I'm taking inspiration from QVTKWidget2 and this stack overflow answer:<br><br>    <a href="http://stackoverflow.com/a/26946040/252857">http://stackoverflow.com/a/26946040/252857</a><br><br></div>which provides a QVTKWidget3 based on QOpenGLWidget.<br><br></div>Given how QVTKWidget2 handles IsCurrentEvent, IsDirectEvent and SupportsOpenGLEvent from the render window [1], e.g:<br><br>void QVTKWidget2::IsCurrent(vtkObject*, unsigned long, void*, void* call_data)<br>{<br>  bool* ptr = reinterpret_cast<bool*>(call_data);<br>  *ptr = QGLContext::currentContext() == this->context();<br>}<br><br></div>Is there any way to do this operation from Python? I know there's some support for callData, but how would I effect a write to the memory pointed at by the call_data parameter like this from Python?<br><br></div>If it's not possible, am I completely doomed in trying to make a Python class similar to QVTKWidget2?<br><br></div>Many thanks in advance,<br></div>Elvis<br><div><div><div><div><br>[1] <a href="https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/QtOpenGL/QVTKWidget2.cxx#L458-474">https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/QtOpenGL/QVTKWidget2.cxx#L458-474</a><br></div></div></div></div></div>