# QVTKOpenGLWidget works in constuctor but not responds to signals.

**URL:** https://discourse.vtk.org/t/qvtkopenglwidget-works-in-constuctor-but-not-responds-to-signals/878
**Category:** Support
**Created:** [April 30, 2019, 11:44am UTC](https://discourse.vtk.org/t/qvtkopenglwidget-works-in-constuctor-but-not-responds-to-signals/878 "2019-04-30T11:44:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pkusunjy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/p/8797f3/32.png) [@pkusunjy](https://discourse.vtk.org/u/pkusunjy)
#### Post date: [April 30, 2019, 11:44am UTC](https://discourse.vtk.org/t/qvtkopenglwidget-works-in-constuctor-but-not-responds-to-signals/878/1 "2019-04-30T11:44:26Z")

</div>

Hi, I have a QVTKOpenGLWidget in mainwindow, it’s promoted from QWidget.  
I need to draw something(say cylinder, .ply) in the QVTKOpenGLWidget, and when I write code in constructor, everything is ok, but when I connect related code to a signal (an action in menu), nothing is painted when the action is triggered.  
Thank you.

(For more details please see: [https://stackoverflow.com/questions/55833867/qvtkopenglwidget-doesnt-respond-to-signal-while-other-widgets-in-the-same-ui](https://stackoverflow.com/questions/55833867/qvtkopenglwidget-doesnt-respond-to-signal-while-other-widgets-in-the-same-ui))

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [April 30, 2019, 12:07pm UTC](https://discourse.vtk.org/t/qvtkopenglwidget-works-in-constuctor-but-not-responds-to-signals/878/2 "2019-04-30T12:07:27Z")

</div>

Please see this example :  
[https://lorensen.github.io/VTKExamples/site/Cxx/Qt/RenderWindowNoUiFile/](https://lorensen.github.io/VTKExamples/site/Cxx/Qt/RenderWindowNoUiFile/)
