# Adding a widget with Qt Designer to custom module is not functional

**URL:** <https://discourse.slicer.org/t/adding-a-widget-with-qt-designer-to-custom-module-is-not-functional/12380>\
**Category:** Support\
**Created:** [July 5, 2020, 11:43am UTC](https://discourse.slicer.org/t/adding-a-widget-with-qt-designer-to-custom-module-is-not-functional/12380 "2020-07-05T11:43:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 5, 2020, 11:43am UTC](https://discourse.slicer.org/t/adding-a-widget-with-qt-designer-to-custom-module-is-not-functional/12380/1 "2020-07-05T11:43:50Z")

</div>

I could not get a qMRMLNodeComboBox to work in a custom module created by Extension Wizard.

It is added to the module’s UI with Qt Designer and its nodeTypes property set to vtkMRMLScalarVolumeNode. The attached screenshot shows that the appended qMRMLNodeComboBox is always disabled, and above all, is never populated.

 ![Screenshot_20200705_121652](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/d/ada7168983876adf5045f32520b8fb2cbe00b372.png)

Whether the appended qMRMLNodeComboBox is added to updateGUIFromParameterNode and to updateParameterNodeFromGUI does not help.

Qt Designer is helpful to design UI, but I could not get it to work. Please see this [link](https://yadi.sk/d/RW_LiqrYqCgg0Q) for the test module used here, and advise about a fix.

Regards.

---

<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:** [July 5, 2020, 12:45pm UTC](https://discourse.slicer.org/t/adding-a-widget-with-qt-designer-to-custom-module-is-not-functional/12380/2 "2020-07-05T12:45:44Z")

</div>

I think that is usually the case when you haven’t set the mrmlScene to the mrml widget. See [https://github.com/Slicer/Slicer/blob/36f626ac5dabad2052da1e429b4565034a2726bb/Utilities/Templates/Modules/Scripted/TemplateKey.py#L117-L120](https://github.com/Slicer/Slicer/blob/36f626ac5dabad2052da1e429b4565034a2726bb/Utilities/Templates/Modules/Scripted/TemplateKey.py#L117-L120)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 5, 2020, 7:16pm UTC](https://discourse.slicer.org/t/adding-a-widget-with-qt-designer-to-custom-module-is-not-functional/12380/3 "2020-07-05T19:16:19Z")

</div>

Yes, now it works, will have to discover other hidden features of Qt Designer. Thank you.
