# How to use vtkRenderWindowInteractor in QVTKOpenGLNativeWidget

**URL:** https://discourse.vtk.org/t/how-to-use-vtkrenderwindowinteractor-in-qvtkopenglnativewidget/2499
**Category:** Support
**Created:** [January 26, 2020, 7:20am UTC](https://discourse.vtk.org/t/how-to-use-vtkrenderwindowinteractor-in-qvtkopenglnativewidget/2499 "2020-01-26T07:20:51Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![yuhuimoon](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/c6cbf5/32.png) [@yuhuimoon](https://discourse.vtk.org/u/yuhuimoon)
#### Post date: [January 27, 2020, 2:35am UTC](https://discourse.vtk.org/t/how-to-use-vtkrenderwindowinteractor-in-qvtkopenglnativewidget/2499/3 "2020-01-27T02:35:15Z")

</div>

According to your code, I define the oject ‘vtkOrientationMarkerWidget’ as a member variable of the class MyViewer instead of local variable in the function. It works! That’s the reason why I can not see the result. Thank you very much!

---

_[View the full topic](https://discourse.vtk.org/t/how-to-use-vtkrenderwindowinteractor-in-qvtkopenglnativewidget/2499)._
