I create a Qt widget named ‘MyWidget’ in Modules-Markups-Widgets project.but in python script ,
it occour error,say: slicer.MyWidget is not found ,but slicer.qSlicerSimpleMarkupsWidget can use.
my ‘MyWidget’ and qSlicerSimpleMarkupsWidget are in same project . I dont know why?
I create a Qt widget named ‘MyWidget’
Are you asking how to reuse a Qt widget written in C++ from Python ?
This is fully possible, and I have done it many times. The question is what step you are missing, which we cannot tell from this much information. Please describe your approach in as much detail as possible. How did you add the widget and in what project? What files does it include? Did you add all of them to CMakeLists? Did you build the code? How do you start Slicer? Things like this… Thanks.