Thanks for the hint!
I found that the “NonOrthogonalSource” is using an autostart interface, and I cloned the setup - successfully: I am getting calls to
Next I tried it with the following code inside the startup() function:
QMainWindow* mainWindow = qobject_cast<QMainWindow*>(pqCoreUtilities::mainWidget());
QList<QDockWidget*> all_docks = mainWindow->findChildren<QDockWidget*>("vtkAtgPlannerDockPanel");
QDockWidget* plannerDock = all_docks.front();
or also with simply
plannerDock->hide(); in the last line. However this did not have any effect: the dock panel remains visible until I go and manually hide it in the View menu! And it turns out that at the moment when
startup() is called, the
findChildren() call does not find any dock widget yet. It looks like this autostart interface is for cases where something needs to be done before the plugin is loaded, not after.
Actually I was looking for the “magic” that so many other dock widgets seem to use that do not show on startup by default, but I did not find it yet!