Workflow that brings together a few modules as tabs in a unifying parent module.

Agreed. The next set of commits should enable that.

1 Like

In addition of supporting Slicer --designer where the Slicer launcher is available, the cross-platform approach to start Qt designer is to run SlicerDesigner executable found in the bin directory.

It was needed to configure a launcher because on macOS it is not possible to run ./Slicer --designer from an install tree.

Based on tomorrow nightly build, we may have to tweak the packaging of designer on Windows and macOS. After this is tested, we will initiate the 4.10.1 release process.

Just an FYI to all, I have recently stumbled upon this issue.

I will work on a fix, but until then, the slicer.util.loadUI() approach can’t load re-usable widgets from extensions.

1 Like

Looking at someone else’s code and noticed that they use ScriptedLoadableModuleWidget.setup(self). If one starts from the python generated module template this function is not called and the template instead has code to produce a reload button reload and test button and connections and a method to reload modules.

The older templates included the developer section, but now they use the superclass:

Is that not working?

I ran the script more than a year ago. Could be my fault. Will check.

Yep I was using a template I generated too long ago…

1 Like

I have thinking about UI reuse a bit more (as opposed to logic reuse). Do you all agree that it is just a case of putting all the UI stuff in a new class… let’s call it ModuleNameWidgetUI with some constructor expecting a layout whereby said class is also designed so that MRML node(s) can be “passed in” and for each MRML “passed in” the node selection widget is not created and the “passed in” value is used instead?

The current design is that each module offers a number of reusable widgets. The module widget is built up a couple of these widgets. This results in much simpler design and more clean interfaces than trying to make a large monolithic module widget highly configurable with lots of options.

Some module widgets may contain sections that are not available directly as reusable widgets (we did not have the extra time to do that or did not think that there would be a strong need for it). If you want to reuse such sections in your module then the solution is to factor out those parts as a separate widget - as it has been done several times in the past.

1 Like