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

Cory Quammen cory.quammen at kitware.com
Wed Jun 8 11:14:42 EDT 2016


Lukas,

Yes, folks have seen this kind of behavior in other applications that
use VTK with Qt 5.x on OS X. The problem has yet to be identified, but
should hopefully be resolved in the near future.

Cory

On Wed, Jun 8, 2016 at 1:32 PM, Schulte, Lukas
<lukas.schulte at mpibpc.mpg.de> wrote:
> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list