qMRMLSubjectHierarchyComboBox as parameter node

I’d like to programmatically assign a subject hierarchy group to a qMRMLSubjectHierarchyComboBox in my module. After setting SlicerParameterName property to hNode, in designer I add hNode to my parameterNodeWrapper

hNode:  vtkMRMLSubjectHierarchyNode

with appropriate import.

However… at module reload:

RuntimeError: Unable to create GUI connector from datatype '<class 'MRMLCorePython.vtkMRMLSubjectHierarchyNode'>' to widget type '<class 'PythonQt.qSlicerSubjectHierarchyModuleWidgets.qMRMLSubjectHierarchyComboBox'>'. To determine which data types can be connected to which widget types, please check 'canRepresent' methods in 'GuiConnector' classes in these files: C:\Users\amorton1\AppData\Local\slicer.org\Slicer 5.8.1\lib\Slicer-5.8\qt-scripted-modules\SubjectHierarchyLib\parameterNodeWrapper\guiConnectors.py,

Which indicates

 def canRepresent(widget, datatype) -> bool:
        return type(widget) == qMRMLSubjectHierarchyTreeView and isNodeOrUnionOfNodes(datatype)

I’m a bit stuck

Is there an appropriate data type I can assign to hNode in my parameterNodeWrapper ?

GUI connectors are not implemented for some less-frequently used widgets. I’ve added a GUI connector for this that can connect a MRML node to the subject hierarchy combobox:

It would be great if you could test it.

Will do! Thank-you @lassoan !