QtDesigner: promote widget for python from compiled module


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?

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.

1 Like

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