code: def parent(self, index):
          
          if not index.isValid():
              return QtCore.QModelIndex()
          p = index.internalPointer()
          if p is self._conf:
              return QtCore.QModelIndex()
          pp = p.parent
          pk = p.name
          row = (pp.scalars + pp.sections).index(pk)
          return self.createIndex(row, 0, pp)
docs: Reimplemented from QtCore.QAbstractItemModel