<div>Hello Sankhesh,</div><div><br></div><div>thanks a lot for the reply.</div><div><br></div><div>Let's say the GUI "pipeline" is as I explained to Elvis. Then:<br></div><ul><li>At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue.<br></li><li>What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view.</li><li>Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)?</li></ul>Thanks a lot again for the help.<br>Best,<br>Luca<br>
<br>
<blockquote>
----Messaggio originale----<br>
Da: "Sankhesh Jhaveri" <sankhesh.jhaveri@kitware.com><br>
Data: 17-ott-2017 14.21<br>
A: "Elvis Stansvik"<elvis.stansvik@orexplore.com>, "bartolomei-luca@virgilio.it"<bartolomei-luca@virgilio.it><br>
Cc: "VTK Users"<vtkusers@vtk.org><br>
Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets<br>
<br>
<div dir="ltr"><div class="markdown-here-wrapper" style="font-family:"Lucida Sans",Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi Luca,</p>
<ul style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px"><p style="margin:0px 0px 1.2em!important;margin:0.5em 0px!important">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.</p>
</li>
<li style="margin:0.5em 0px"><p style="margin:0px 0px 1.2em!important;margin:0.5em 0px!important">Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly?</p>
</li>
<li style="margin:0.5em 0px"><p style="margin:0px 0px 1.2em!important;margin:0.5em 0px!important">Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes.</p>
</li>
</ul>
<p style="margin:0px 0px 1.2em!important">Best,<br>Sankhesh</p>
<div title="MDH:SGkgTHVjYSw8ZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+LSBEbyB0aGUgUVdpZGdldCBhbmQgUVZU
S1dpZGdldCBvdmVybGFwIGF0IGFsbCBvciBhcmUgdGhleSBzZXBhcmF0ZWQgYnkgc29tZSBRRnJh
bWUgYm9yZGVyLCBldGMuID8gSWYgdGhleSBhcmUgbm90IG92ZXJsYXBwaW5nLCBpdCBtZWFucyB0
aGV5IGFyZSBub3Qgc2hhcmluZyB0aGUgT3BlbkdMIGNvbnRleHQuPC9kaXY+PC9kaXY+PGRpdj48
YnI+PC9kaXY+PGRpdj4tIEhhdmUgeW91IHRyaWVkIHJlcGxhY2luZyB0aGUgUk9TIHdpZGdldCB3
aXRoIGEgc2ltcGxlIGJ1dHRvbiB0byBzZWUgaWYgdGhlIFFWVEtXaWRnZXQgd29ya3MgcHJvcGVy
bHk/PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj4tIExhc3RseSwgdGhlIFFWVEtXaWRnZXQgaXMg
a25vd24gdG8gaGF2ZSByZW5kZXJpbmcgaXNzdWVzIHdpdGggUXQ1LiBUcnkgdXNpbmcgdGhlIFFW
VEtPcGVuR0xXaWRnZXQgdG8gc2VlIGlmIGFueXRoaW5nIGNoYW5nZXMuPC9kaXY+PGRpdj48YnI+
PC9kaXY+PGRpdj5CZXN0LDwvZGl2PjxkaXY+U2Fua2hlc2g8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2017-10-17 9:22 GMT+02:00 <a href="mailto:bartolomei-luca@virgilio.it" target="_blank">bartolomei-luca@virgilio.it</a><br>
<<a href="mailto:bartolomei-luca@virgilio.it" target="_blank">bartolomei-luca@virgilio.it</a>>:<br>
> Hello Elvis,<br>
><br>
> thanks for your reply.<br>
> I don't have the gui avaiable right now; I will send a picture as soon as I<br>
> can.<br>
><br>
> To answer your question: yes, if I remove the QVTKWidget and replace it with<br>
> QWidget everything works. The problems occur only when the QVTKWidget is<br>
> present.<br>
><br>
> The GUI is built to work in this way:<br>
> 1) start showing stuff on the QWidget;<br>
> 2) After a while, the QVTKWidget shows some other stuff.<br>
><br>
> The QWidget is showing some interactive scene and it uses a library<br>
> ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem<br>
> happen because the QVTKWidget interfere with the already existing OpenGL<br>
> context?<br>
<br>
I don't know, but it sounds like it's possible. I think there are<br>
other people on this list who knows much more about OpenGL and how VTK<br>
uses it than I do, so I'll let those answer that.<br>
<br>
Elvis<br>
<br>
> I don't know if this is the cause, because it is sufficient to have the<br>
> QVTKWidget on the Gui to make the QWidget freeze.<br>
><br>
> Anyway, I have looked at this example:<br>
> <a href="https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT" rel="noreferrer" target="_blank">https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT</a><br>
> but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce<br>
> GTX 950M on Ubuntu 14.04 LTS).<br>
><br>
> Best,<br>
> Luca<br>
><br>
><br>
> ----Messaggio originale----<br>
> Da: "Elvis Stansvik" <<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>><br>
> Data: 17-ott-2017 8.36<br>
> A: <<a href="mailto:bartolomei-luca@virgilio.it" target="_blank">bartolomei-luca@virgilio.it</a>><br>
> Cc: "VTK Users"<<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
> Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets<br>
><br>
><br>
> Den 13 okt. 2017 12:08 em skrev "<a href="mailto:bartolomei-luca@virgilio.it" target="_blank">bartolomei-luca@virgilio.it</a>"<br>
> <<a href="mailto:bartolomei-luca@virgilio.it" target="_blank">bartolomei-luca@virgilio.it</a>>:<br>
><br>
> Hello everyone!<br>
><br>
> I have a problem with the QT GUI I am creating. Basically, I have an<br>
> interactive QWidget, a QVTKWidget and a "Quit" button.<br>
><br>
> When I launch my app, I can interact with the QWidget without any problem (I<br>
> have a 3D interactive scene, where I can zoom and rotate).<br>
> However, as soon as the QVTKWidget becomes "active" (i.e. some function in<br>
> my code start using it or if I click on it), both the QWidget and the<br>
> QVTKWidget freeze. The app keeps on working, since the "Quit" button works<br>
> as it should.<br>
><br>
> If I have a GUI with either the QWidget or the QVTKWidget (only one of them)<br>
> everything works fine. The problem is if I try to include both of them at<br>
> the same time.<br>
><br>
> Do you have any idea why this happens?<br>
><br>
><br>
> I don't have any immediate ideas. It would really help to see a small<br>
> example where the problem occurs.<br>
><br>
> Does it work if you put two of your QWidgets in the application. I mean, if<br>
> you remove the QVTKWidget and put another one of your QWidget where it was?<br>
><br>
> Elvis<br>
><br>
><br>
> Thanks a lot for you help.<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
><br>
><br>
><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-markdown-here-wrapper" style="font-family:'proza libre',sans-serif;color:rgb(0,56,107)"><h5 id="inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:'open sans',sans-serif;font-weight:normal"><i>Sr. Research & Development Engineer</i> | <a href="http://www.kitware.com/">Kitware</a> | (518) 881-4417</h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdi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:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div></div>
<br>
</blockquote><br>