code: def _updateEncoding(self, index):
          
          encoding = self._encodingComboBox.itemText(index)
          encoding = encoding.lower()
  
          self._encodingKey = _calculateEncodingKey(encoding)
          self._previewFile()
docs: Changes the value of the encoding combo box to the value of given index.
  
          This method is also a `SLOT`.
          After the encoding is changed, the file will be reloaded and previewed.
  
          Args:
              index (int): An valid index of the combo box.