# QtDesigner: promote widget for python from compiled module

**URL:** https://discourse.slicer.org/t/qtdesigner-promote-widget-for-python-from-compiled-module/21508
**Category:** Development
**Created:** [January 18, 2022, 3:55am UTC](https://discourse.slicer.org/t/qtdesigner-promote-widget-for-python-from-compiled-module/21508 "2022-01-18T03:55:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)
#### Post date: [January 18, 2022, 3:55am UTC](https://discourse.slicer.org/t/qtdesigner-promote-widget-for-python-from-compiled-module/21508/1 "2022-01-18T03:55:07Z")

</div>

Hi,

I’m wondering if I have compiled widget `qMyWidget` and binded it to python (standard case in Slicer). Is it possible to promote widget to `qMyWidget` for python module in QDesigner?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [March 13, 2022, 4:48am UTC](https://discourse.slicer.org/t/qtdesigner-promote-widget-for-python-from-compiled-module/21508/2 "2022-03-13T04:48:36Z")

</div>

You can directly use a widget in Qt Designer if you created a designer plugin for it. Most widgets in Slicer have a designer plugin, so you can use those as examples.

If you don’t have a plugin then maybe promotion works, but I don’t know if it is done anywhere. If we need to add a custom widget somewhere then we usually add a frame in Qt designer and then instantiate and add the custom widget in the widget’s setup method.

---

<div class="post-metadata">

### Author: ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)
#### Post date: [March 15, 2022, 7:12pm UTC](https://discourse.slicer.org/t/qtdesigner-promote-widget-for-python-from-compiled-module/21508/3 "2022-03-15T19:12:04Z")

</div>

> [@lassoan](#):
>
> If you don’t have a plugin then maybe promotion works, but I don’t know if it is done anywhere.

That was my case  
As I remember I used to have custom widget written in C++ and tried to `promote` to it and use the generated `.ui` file with python… I didn’t succeded.

Probably later I will try it again
