<div dir="ltr"><b>The solution I found was to d<div style="display:inline">isable multisampling on the </div><div style="display:inline">QSurfaceFormat before setting the default surface format, meaning to</div> replace the following:</b><div><br></div><div><div>QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());</div><div><br></div></div><div><b>with the following:</b></div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><div>QSurfaceFormat fmt = QVTKOpenGLWidget::defaultFormat();</div><div>fmt.setSamples(0);</div><div>QSurfaceFormat::setDefaultFormat(fmt);</div></div><div><br></div><div><b>This was a solution to another problem that I found on this link:</b> <a href="http://vtk.1045678.n5.nabble.com/Issues-using-QVTKOpenGLWidget-td5745401.html">http://vtk.1045678.n5.nabble.com/Issues-using-QVTKOpenGLWidget-td5745401.html</a></div><div><br></div><b>Would anyone explain why this fixes the issue and if there is any consequence to this?</b></div><div><b><br></b></div><div><b>Thanks</b></div><div> <br class="gmail-Apple-interchange-newline"><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 5, 2018 at 5:20 PM, Todd <span dir="ltr"><<a href="mailto:nztoddler@yahoo.com" target="_blank">nztoddler@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">Is the checkbox widget placed within the render window boundary?</div><div dir="auto"><br></div>It sounds like the vtk render window is capturing the mouse events. I'm not familiar with Qt but it seems that the solution would be to grab the mouse event position in your vtk render widow event handler and reroute the event to the widget that bounds that location.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 5 May 2018 9:01 a.m., Sam Raby <<a href="mailto:rabysam28@gmail.com" target="_blank">rabysam28@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-8469127965874041190quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Let me rephrase the issue that I am observing. I run the following vtk example that uses QVTKOpenGLWidget in Qt Creator. I can successfully run the example. Then I added one simple QCheckBox to UI. I can compile the code but the checkbox does not respond to mouse clicking, meaning that If I click on the checkbox it does not get checked, but if I interact with the <span style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline">QVTKOpenGLWidget it causes the checkbox to be updated. Is that a bug? because what I am doing seems pretty basic.</span><div><br></div><div><div style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)"><a href="https://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/SideBySideRenderWindowsQt" style="color:rgb(17,85,204)" target="_blank">https://www.vtk.org/Wiki/VTK/E<wbr>xamples/Cxx/Qt/SideBySideRende<wbr>rWindowsQt</a></div><br></div><div>Thanks<br><br><br>On Friday, May 4, 2018, Sam Raby <<a href="mailto:rabysam28@gmail.com" target="_blank">rabysam28@gmail.com</a>> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="m_-8469127965874041190elided-text"> <br><br><div dir="ltr"><span style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline">I am running the following example of using </span><span style="font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(128,0,128)">QVTKOpenGLWidget </span><span style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline">to display a sphere. </span><div style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/SideBySideRenderWindowsQt" target="_blank">https://www.vtk.org/Wiki/VTK/E<wbr>xamples/Cxx/Qt/SideBySideRende<wbr>rWindowsQt</a></div><div style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="color:rgb(34,34,34);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">It works fine. Then I added one QT Checkbox. but the checkbox is not checkable. After debugging I realized that when I remove the following line of code, the checkbox starts working but <span style="color:rgb(128,0,128);font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline">QVTKOpenGLWidget </span><span style="font-family:'arial',sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline">does not display the sphere anymore. Is that something that I am missing here. QSlicer and other qwidgets also do not work if I keep the following like of code:</span><div><div><br></div><div><pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QSurfaceFormat</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">setDefaultForm<wbr>at</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">QVTKOpenGLWidget</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">defaultFo<wbr>rmat</span><span style="color:rgb(0,0,0)">());</span></pre><pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">Thanks</span></pre><pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">S</span></pre><pre style="margin:0px;text-indent:0px"><br></pre></div></div></div><br><br></div>
</div><br></div>
</blockquote>
</div></div>
</blockquote></div><br></div></div></div></blockquote></div><br></div>