[vtkusers] Widget moving Problem with QWidgets containing vtkRenderer on OSX

Schulte, Lukas lukas.schulte at mpibpc.mpg.de
Wed Jun 8 07:32:09 EDT 2016


Hey everyone,

I'm currently porting a Linux/Windows Software to OSX 10.11, using C++, Qt5.6, VTK 7.0 and compiling using XCode 7.2 . Also I built the project using CMake.

In one of the windows in an MDIArea I'm seeing a strange kind of behavior when the window is moved around :

https://gfycat.com/DeficientHatefulGeese

To me that looks like a problem with refreshing/updating maybe?

The structure of the widget is the following:

MainWidget(The one being moved around in the gif):
  class ImageViewerWidget: public QMainWindow, public AbstractWidget

  ImageViewerWidgets contains a QStackedWidget where the separate Widgets are added to.

The problematic widget containing vtk :
  class ImageVtkHaloWidget : public QWidget

This Widget is setup like this:
  QVTKWidget *_vtk = new QVTKWidget(this, QFlag(0));
  QVBoxLayout *layout = new QVBoxLayout;
  layout->addWidget(_vtk);

Till that point everything works fine, but if a renderer is set the weird behavior of the gif can be seen:

  vtkRenderer* _renderer = vtkRenderer::New();
  _vtk->GetRenderWindow()->AddRenderer(_renderer);

It's not a problem with rendering in general as the rendering of the stuff inside the viewer works fine if the window is held still, just the moving around oft he widget results in weird behavior of the whole Widget.

I couldn't find anything about the reasons for these problems, so I figured I'd turn to people here for help. Has anyone ever seen something like this?  If more information about my system or more code is needed, I'll gladly provide it of course.

Cheers,

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160608/74521bc8/attachment.html>


More information about the vtkusers mailing list