code: def event(self, event):
          
          if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Tab:
              return False
          return QWidget.event(self, event)
docs: Qt Override.
  
          Usefull when in line edit mode.