<div dir="ltr">Nevermind, problem solved. I needed to add a vtkRenderer to the vtkRenderWindow returned by widget->GetRenderWindow().<div><br></div><div>The question about QVTKWidget2 remains open.<br><div><br></div><div>-Júlio<br><div><br></div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-30 15:29 GMT-08:00 Júlio Hoffimann <span dir="ltr"><<a href="mailto:julio.hoffimann@gmail.com" target="_blank">julio.hoffimann@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear all,<div><br></div><div>Consider the following code:</div><div><pre style="color:rgb(0,0,0);font-size:medium"><span style="color:rgb(0,74,67)">#</span><span style="color:rgb(0,74,67)">include </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(64,1,90)">QApplication</span><span style="color:rgb(128,0,0)">></span>
<span style="color:rgb(0,74,67)">#</span><span style="color:rgb(0,74,67)">include </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(64,1,90)">QMainWindow</span><span style="color:rgb(128,0,0)">></span>
<span style="color:rgb(0,74,67)">#</span><span style="color:rgb(0,74,67)">include </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(64,1,90)">vtkSmartPointer.h</span><span style="color:rgb(128,0,0)">></span>
<span style="color:rgb(0,74,67)">#</span><span style="color:rgb(0,74,67)">include </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(64,1,90)">QVTKWidget.h</span><span style="color:rgb(128,0,0)">></span>
<span style="color:rgb(128,0,0);font-weight:bold">int</span> <span style="color:rgb(64,0,0)">main</span><span style="color:rgb(128,128,48)">(</span> <span style="color:rgb(128,0,0);font-weight:bold">int</span> argc<span style="color:rgb(128,128,48)">,</span> <span style="color:rgb(128,0,0);font-weight:bold">char</span> <span style="color:rgb(128,128,48)">*</span><span style="color:rgb(128,128,48)">*</span>argv <span style="color:rgb(128,128,48)">)</span>
<span style="color:rgb(128,0,128)">{</span>
QApplication app<span style="color:rgb(128,128,48)">(</span>argc<span style="color:rgb(128,128,48)">,</span>argv<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">;</span>
QMainWindow <span style="color:rgb(128,128,48)">*</span>mainWindow <span style="color:rgb(128,128,48)">=</span> <span style="color:rgb(128,0,0);font-weight:bold">new</span> QMainWindow<span style="color:rgb(128,0,128)">;</span>
QVTKWidget <span style="color:rgb(128,128,48)">*</span>widget <span style="color:rgb(128,128,48)">=</span> <span style="color:rgb(128,0,0);font-weight:bold">new</span> QVTKWidget<span style="color:rgb(128,0,128)">;</span>
mainWindow<span style="color:rgb(128,128,48)">-</span><span style="color:rgb(128,128,48)">></span>setCentralWidget<span style="color:rgb(128,128,48)">(</span>widget<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">;</span>
mainWindow<span style="color:rgb(128,128,48)">-</span><span style="color:rgb(128,128,48)">></span>show<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(128,0,0);font-weight:bold">return</span> app<span style="color:rgb(128,128,48)">.</span>exec<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(128,0,128)">}</span></pre></div><div>If I compile it on my Linux box with Qt5 and VTK 6.2, I get a black window with strange effects whenever I try to resize it. It may be a graphics card issue, can you reproduce it?</div><div><br></div><div>Also, what is the difference between QVTKWidget and QVTKWidget2? I wasn't able to find them in the Doxygen online reference.</div><div><br></div><div>Best,</div><div>Júlio.</div></div>
</blockquote></div><br></div>