def __init__(self, qgis_utils): QDialog.__init__(self) self.setupUi(self) self.qgis_utils = qgis_utils self.check_local_help() self.tb_changelog.setOpenExternalLinks(True) if QGIS_LANG == 'en': file = QFile( ":/Asistente-LADM_COL/resources/html/Changelog_en.html") else: file = QFile(":/Asistente-LADM_COL/resources/html/Changelog.html") if not file.open(QIODevice.ReadOnly | QIODevice.Text): raise Exception(file.errorString()) codec = QTextCodec.codecForLocale() stream = QTextStream(file) stream.setCodec(codec) self.tb_changelog.setHtml(stream.readAll())
def show_output(self, byte_array): codec = QTextCodec.codecForLocale() unicode_text = codec.toUnicode(byte_array) self.report_progress(unicode_text)