Custom application does not open module at startup

I’ve compiled a custom application using the most recent Slicer commit on MacOS. In my superbuild CMakeList.txt file, I specify a default home module, currently set to Welcome:

set(Slicer_DEFAULT_HOME_MODULE “Welcome”)

When I run the application, both from the command line and after packaging, no module is opened at startup. Is this the expected behaviour? Is there somewhere else I need to set the module that should be opened at startup?

Based on what I know it should work as you expect it to work. However, usually we don’t specify this in a CMakeLists.txt file, but we use this at the time of CMake configuration. So this would be a cmake argument like this


I can confirm, too, that set(Slicer_DEFAULT_HOME_MODULE “Welcome”) works. You would include it in the top-level CMakeLists.txt file if you use the custom application template. Note that the in the custom application template, “Welcome” module is disabled, so you either need to remove it from the disabled list or choose another home module.

Thanks, I tested setting it in the GUI instead. Though I guess that won’t do much good if my CMakeLists sets the module to be disabled!

Thank you. I’m trying a clean build now, with Data as the default module.

Another thing to note is that I’m hiding all of the toolbars in my custom application qAppMainWindow.cxx setupUi method:

// Hide the toolbars

Does this interfere with the creation of the qSlicerModuleManager?

Right, I missed the part that this is for a custom application. My bad…

1 Like

No problem! I’ll see how this build goes once it’s done.


The default for custom application is expected to be “Home”. See{{cookiecutter.project_name}}/CMakeLists.txt#L42

Changing the value in the CMakeLists.txt and re-configuring and re-building the project from the top-level will have the expected effect.
Configuring the project passing Slicer_DEFAULT_HOME_MODULE option is also expected to change the value.

Ultimately the value is configured into the header Slicer/CMake/

Thank you - I can see where it should be set on line 14 of, and the correct value appears in Slicer-build/vtkSlicerConfigure.h:

#define Slicer_DEFAULT_HOME_MODULE “Data”

However, I’ve tried building the full Superbuild again, and when I run the executable, it starts with a blank module panel.

The error log doesn’t have much in it:

Debug, Python
Scripted subject hierarchy plugin registered: Annotations
Scripted subject hierarchy plugin registered: SegmentEditor
Scripted subject hierarchy plugin registered: SegmentStatistics

Warning, Qt
libpng warning: iCCP: known incorrect sRGB profile

Debug, Qt
Session start time …: 2018-11-30 13:49:09
Slicer version …: 4.11.0-2018-11-14 (revision 60adeea) macosx-amd64 - not installed release
PADPlanner2 version …: 1.2.0-2018-11-29 (revision 25c786a)
Operating system …: Mac OS X / 10.12.6 / 16G1618 - 64-bit
Memory …: 16384 MB physical, 1024 MB virtual
CPU …: GenuineIntel Intel® Core™ i7-6567U CPU @ 3.30GHz, 2 cores, 4 logical processors
VTK configuration …: OpenGL2 rendering, Sequential threading
Developer mode enabled …: no
Prefer executable CLI …: yes
Additional module paths …: (none)

What could be causing this?

In CMakeLists.txt files you only modify the default .ini file content. Delete the current .ini file if you want the application to start from default settings.

Ok. Which .ini file?


Rebuilding anything will not have any effect. Application setting .ini is stored in the user’s profile:

Ok, sorry, I didn’t know. I’ll delete those and try again.

Excellent! Thank you. That solved it.

1 Like