[vtkusers] QVTKWidget in QT GUI freezes other QWidgets

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Tue Oct 17 08:21:08 EDT 2017


Hi Luca,

   -

   Do the QWidget and QVTKWidget overlap at all or are they separated by
   some QFrame border, etc. ? If they are not overlapping, it means they are
   not sharing the OpenGL context.
   -

   Have you tried replacing the ROS widget with a simple button to see if
   the QVTKWidget works properly?
   -

   Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try
   using the QVTKOpenGLWidget to see if anything changes.

Best,
Sankhesh
​

On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik <elvis.stansvik at orexplore.com>
wrote:

> 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it
> <bartolomei-luca at virgilio.it>:
> > Hello Elvis,
> >
> > thanks for your reply.
> > I don't have the gui avaiable right now; I will send a picture as soon
> as I
> > can.
> >
> > To answer your question: yes, if I remove the QVTKWidget and replace it
> with
> > QWidget everything works. The problems occur only when the QVTKWidget is
> > present.
> >
> > The GUI is built to work in this way:
> > 1) start showing stuff on the QWidget;
> > 2) After a while, the QVTKWidget shows some other stuff.
> >
> > The QWidget is showing some interactive scene and it uses a library
> > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem
> > happen because the QVTKWidget interfere with the already existing OpenGL
> > context?
>
> I don't know, but it sounds like it's possible. I think there are
> other people on this list who knows much more about OpenGL and how VTK
> uses it than I do, so I'll let those answer that.
>
> Elvis
>
> > I don't know if this is the cause, because it is sufficient to have the
> > QVTKWidget on the Gui to make the QWidget freeze.
> >
> > Anyway, I have looked at this example:
> > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT
> > but no luck so far. Maybe is a problem of drivers (I have an Nvidia
> GeForce
> > GTX 950M on Ubuntu 14.04 LTS).
> >
> > Best,
> > Luca
> >
> >
> > ----Messaggio originale----
> > Da: "Elvis Stansvik" <elvis.stansvik at orexplore.com>
> > Data: 17-ott-2017 8.36
> > A: <bartolomei-luca at virgilio.it>
> > Cc: "VTK Users"<vtkusers at vtk.org>
> > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets
> >
> >
> > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it"
> > <bartolomei-luca at virgilio.it>:
> >
> > Hello everyone!
> >
> > I have a problem with the QT GUI I am creating. Basically, I have an
> > interactive QWidget, a QVTKWidget and a "Quit" button.
> >
> > When I launch my app, I can interact with the QWidget without any
> problem (I
> > have a 3D interactive scene, where I can zoom and rotate).
> > However, as soon as the QVTKWidget becomes "active" (i.e. some function
> in
> > my code start using it or if I click on it), both the QWidget and the
> > QVTKWidget freeze. The app keeps on working, since the "Quit" button
> works
> > as it should.
> >
> > If I have a GUI with either the QWidget or the QVTKWidget (only one of
> them)
> > everything works fine. The problem is if I try to include both of them at
> > the same time.
> >
> > Do you have any idea why this happens?
> >
> >
> > I don't have any immediate ideas. It would really help to see a small
> > example where the problem occurs.
> >
> > Does it work if you put two of your QWidgets in the application. I mean,
> if
> > you remove the QVTKWidget and put another one of your QWidget where it
> was?
> >
> > Elvis
> >
> >
> > Thanks a lot for you help.
> >
> > _______________________________________________
> > 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
> >
> >
> >
> >
> _______________________________________________
> 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
>
-- 
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171017/2abc6e6c/attachment.html>


More information about the vtkusers mailing list