# How can i integrate the QWidget and the vtkContextView?

**URL:** https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895
**Category:** Development
**Created:** [March 27, 2020, 9:43am UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895 "2020-03-27T09:43:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![wulicheng](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wulicheng/32/1990_2.png) [@wulicheng](https://discourse.vtk.org/u/wulicheng)
#### Post date: [March 27, 2020, 9:43am UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895/1 "2020-03-27T09:43:28Z")

</div>

![colorEditer](https://discourse.vtk.org/uploads/default/original/2X/6/69e80355a33467bff7cde0a810ee35fcbfad5637.png)  
How can i integrate the vtkContextView withe the Qt’widget like QVTKＷＩｇｅｔ?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 27, 2020, 7:56pm UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895/2 "2020-03-27T19:56:50Z")

</div>

CTK toolkit’s [chart view base class](https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKChartView.cpp) is a good example. CTK also has specialized functions for editing VTK volume rendering transfer functions, such as [ctkTransferFunctionWidget](http://www.commontk.org/index.php/Documentation/ctkTransferFunctionWidget):

![image](https://discourse.vtk.org/uploads/default/original/2X/5/579652ffa043c2c08151392bc71360fca43da87c.png)

![image](https://discourse.vtk.org/uploads/default/original/2X/7/7179b85afc8b8807fe469ee4d0629b4530096bc1.png)

![image](https://discourse.vtk.org/uploads/default/original/2X/8/8d97670b3f2d1abded0a20749b8345508d5f3438.png)

These widgets are widely used in applications, such as 3D Slicer and MITK.

---

<div class="post-metadata">

### Author: ![wulicheng](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wulicheng/32/1990_2.png) [@wulicheng](https://discourse.vtk.org/u/wulicheng)
#### Post date: [March 28, 2020, 2:24am UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895/3 "2020-03-28T02:24:10Z")

</div>

Ok, that is a good suggestion. thanks!

---

<div class="post-metadata">

### Author: ![wulicheng](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wulicheng/32/1990_2.png) [@wulicheng](https://discourse.vtk.org/u/wulicheng)
#### Post date: [March 28, 2020, 3:12pm UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895/4 "2020-03-28T15:12:10Z")

</div>

any other suggestions?

---

<div class="post-metadata">

### Author: ![nicfel](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicfel/32/3639_2.png) [@nicfel](https://discourse.vtk.org/u/nicfel)
#### Post date: [August 21, 2021, 10:34am UTC](https://discourse.vtk.org/t/how-can-i-integrate-the-qwidget-and-the-vtkcontextview/2895/5 "2021-08-21T10:34:36Z")

</div>

Thank you for that! Really helped me out 🙂
