code: def updateEditorGeometry(self, editor, option, index):
          
          cti = index.model().getItem(index)
          if cti.checkState is None:
              displayRect = option.rect
          else:
              checkBoxRect = widgetSubCheckBoxRect(editor, option)
              offset = checkBoxRect.x() + checkBoxRect.width()
              displayRect = option.rect
              displayRect.adjust(offset, 0, 0, 0)
  
          editor.setGeometry(displayRect)
docs: Ensures that the editor is displayed correctly with respect to the item view.