[vtkusers] Handling "out" pointer callData parameters in events from Python

Elvis Stansvik elvis.stansvik at orexplore.com
Thu Jun 23 10:26:35 EDT 2016

Hi all,

I'm trying to make a QOpenGLWidget based VTK widget, and I'm taking
inspiration from QVTKWidget2 and this stack overflow answer:


which provides a QVTKWidget3 based on QOpenGLWidget.

Given how QVTKWidget2 handles IsCurrentEvent, IsDirectEvent and
SupportsOpenGLEvent from the render window [1], e.g:

void QVTKWidget2::IsCurrent(vtkObject*, unsigned long, void*, void*
  bool* ptr = reinterpret_cast<bool*>(call_data);
  *ptr = QGLContext::currentContext() == this->context();

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?

If it's not possible, am I completely doomed in trying to make a Python
class similar to QVTKWidget2?

Many thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160623/ce09cb96/attachment.html>

More information about the vtkusers mailing list