# How to use a widget in my module

**URL:** <https://discourse.slicer.org/t/how-to-use-a-widget-in-my-module/14756>\
**Category:** Development\
**Created:** [November 24, 2020, 2:18pm UTC](https://discourse.slicer.org/t/how-to-use-a-widget-in-my-module/14756 "2020-11-24T14:18:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ond12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ond12/32/8706_2.png) [@ond12](https://discourse.slicer.org/u/ond12)\
**Post date:** [November 24, 2020, 2:18pm UTC](https://discourse.slicer.org/t/how-to-use-a-widget-in-my-module/14756/1 "2020-11-24T14:18:00Z")

</div>

Hello,

I added a “qMRMLVolumeThresholdWidget” in my module thanks to qt designer.  
But the slider is grey and i can’t modify the Threshold.

How can i interact with a widget this type ?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [November 24, 2020, 9:18pm UTC](https://discourse.slicer.org/t/how-to-use-a-widget-in-my-module/14756/2 "2020-11-24T21:18:46Z")

</div>

[qMRMLVolumeThresholdWidget](https://apidocs.slicer.org/master/classqMRMLVolumeThresholdWidget.html) inherits from [qMRMLVolumeWidget](https://apidocs.slicer.org/master/classqMRMLVolumeWidget.html) which requires a MRML volume to be set.

```python
# Get a node from SampleData that we will clone
import SampleData
volume_node = SampleData.SampleDataLogic().downloadMRHead()
volume_threshold_widget = slicer.qMRMLVolumeThresholdWidget()
volume_threshold_widget.setMRMLVolumeNode(volume_node)
volume_threshold_widget.show()

```
