code: def indexOf(self, editor):
          
          lay = self.layout()
          for i in range(lay.count()):
              if lay.itemAt(i).widget() == editor:
                  return i
          return -1
docs: Returns the index of the inputed editor, or -1 if not found.
          
          :param      editor | <QtGui.QWidget>
          
          :return     <int>