Custom default name for volume created from qMRMLNodeComboBox

Hello,

I am writing my own python scripted loadable module, and I have a qMRMLNodeComboBox where the user is able to optionally choose to “Create a New Volume As…”. However, currently the default New Name is “Volume_”. I would like to customize this new name that is initially presented to the user. I have searched through the sourcecode and found that I can possibly set this default name using qMRMLNodeFactory.setBaseName (maybe?). Am I on the right track here? If so, how do I connect this to my combobox?

much appreciated,
E

The syntax is myCombobox.baseName='something'

(https://apidocs.slicer.org/v4.8/classqMRMLNodeComboBox.html#a122b3eae788ad580c0dc73976ccd1bb1)

1 Like

Thank you very much!

1 Like