code: def updateEditorGeometry(self, editor, option, index):
          
          qr = editor.frameGeometry()
          cp = QtGui.QDesktopWidget().availableGeometry().center()
          qr.moveCenter(cp)
  
          editor.move(qr.topLeft())
docs: centers the editor widget. :qtdoc:`Re-implemented<QStyledItemDelegate.updateEditorGeometry>`