code: def sort_languages(self, order=Qt.AscendingOrder):
          
  
          self.beginResetModel()
          self.__languages = sorted(self.__languages, key=lambda x: (x.name), reverse=order)
          self.endResetModel()
docs: Sorts the Model languages.
  
          :param order: Order. ( Qt.SortOrder )