# Cannot interact with basic QT/VTK application

**URL:** https://discourse.vtk.org/t/cannot-interact-with-basic-qt-vtk-application/2447
**Category:** Support
**Created:** [January 17, 2020, 12:15pm UTC](https://discourse.vtk.org/t/cannot-interact-with-basic-qt-vtk-application/2447 "2020-01-17T12:15:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ian.liu88](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ian.liu88/32/1262_2.png) [@ian.liu88](https://discourse.vtk.org/u/ian.liu88)
#### Post date: [January 17, 2020, 12:15pm UTC](https://discourse.vtk.org/t/cannot-interact-with-basic-qt-vtk-application/2447/1 "2020-01-17T12:15:45Z")

</div>

I have the following snippet which is correctly displaying a cone shape on screen, but I can’t interact with it, ie pan, rotate, zoom, etc. Should I expect it to be interactive?

```
import sys
import PySide2
from PySide2.QtWidgets import QApplication
from vtkmodules import vtkRenderingOpenGL2
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from vtkmodules.vtkFiltersSources import vtkConeSource
from vtkmodules.vtkRenderingCore import vtkActor, vtkPolyDataMapper, vtkRenderer

app = QApplication(['QVTKRenderWindowInteractor'])

widget = QVTKRenderWindowInteractor()
widget.Initialize()
widget.Start()

ren = vtkRenderer()
widget.GetRenderWindow().AddRenderer(ren)

cone = vtkConeSource()
cone.SetResolution(8)

coneMapper = vtkPolyDataMapper()
coneMapper.SetInputConnection(cone.GetOutputPort())

coneActor = vtkActor()
coneActor.SetMapper(coneMapper)

ren.AddActor(coneActor)

widget.show()
app.exec_()

```

Thanks.

---

<div class="post-metadata">

### Author: ![ian.liu88](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ian.liu88/32/1262_2.png) [@ian.liu88](https://discourse.vtk.org/u/ian.liu88)
#### Post date: [January 17, 2020, 6:33pm UTC](https://discourse.vtk.org/t/cannot-interact-with-basic-qt-vtk-application/2447/2 "2020-01-17T18:33:46Z")

</div>

The problem vanishes if I add `import vtk` before the _vtkmodules_ imports.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 16, 2020, 3:36pm UTC](https://discourse.vtk.org/t/cannot-interact-with-basic-qt-vtk-application/2447/3 "2020-03-16T15:36:55Z")

</div>

You probably just needed to import `vtkmodules.vtkInteractorStyle` or something. The `vtk` module imports all of VTK, so that solves the issue, but ends up bringing in much more than you actually needed to fix the problem (and it is much slower to import due to it bringing in so much).
