AttributeError: qMRMLNodeComboBox has no attribute named 'setNoneEnabled'

Yihao_Liu
Mon, 28 Jun 2021 05:59:39 +0000
Development

Operating system: Ubuntu 20.04
Slicer version: 4.11.20210226
Expected behavior: setNoneEnabled() to disable qMRMLNodeComboBox “none” option
Actual behavior: reported error

My code:
…
self.ui.fid1MRMLNodeComboBox.nodeTypes = [‘vtkMRMLMarkupsFiducialNode’]
self.ui.fid1MRMLNodeComboBox.setNoneEnabled(False)
…
Bug:
Traceback (most recent call last):
File “/home/yl/se/TMSKuka/TMSKukaGUI/TMSKukaGUI.py”, line 92, in setup
self.ui.fid1MRMLNodeComboBox.setNoneEnabled(False)
AttributeError: qMRMLNodeComboBox has no attribute named ‘setNoneEnabled’
Slicer Docs:
https://apidocs.slicer.org/master/qMRMLNodeComboBox_8h_source.html
https://apidocs.slicer.org/master/classqMRMLNodeComboBox.html#a60aadef87aa219043a0177780f22d855

5 posts - 3 participants