code: def paint(self, painter, option, index):
          
          component = index.model().data(index, role=QtCore.Qt.UserRole)
          painter.drawRect(option.rect)
  
          component.paint(painter, option.rect, option.palette)
docs: Uses the :meth:`paint<sparkle.gui.stim.components.qcomponents.QStimulusComponent.paint>` 
          method of the component it represents to fill in an appropriately 
          sized rectange. :qtdoc:`Re-implemented<QStyledItemDelegate.paint>`