def appendQt(self): import qtui self.open() self.write("QT.VERSION: %s", qtui.getQtVersionString()) self.write("QT.JPG_SUPPORT: %s", "supported" if qtui.supportsJPG() else "not supported") self.write("QT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") py_plugin_path = os.path.pathsep.join([ getpath.pathToUnicode(p) for p in qtui.QtCore.QCoreApplication.libraryPaths() ]) self.write("QT.PLUGIN_PATH: %s" % py_plugin_path) qt_plugin_path_env = os.environ[ 'QT_PLUGIN_PATH'] if 'QT_PLUGIN_PATH' in os.environ else "" self.write("QT.PLUGIN_PATH_ENV: %s" % getpath.pathToUnicode(qt_plugin_path_env)) qt_conf_present = os.path.isfile(getpath.getSysPath('qt.conf')) if qt_conf_present: import io f = io.open(getpath.getSysPath('qt.conf'), "r", encoding="utf-8", errors="replace") qt_conf_content = f.read() qt_conf_content = qt_conf_content.replace( '\n', '\n' + (' ' * len('QT.CONF: '))).strip() f.close() self.write("QT.CONF: %s" % qt_conf_content) else: self.write("QT.CONF: NOT PRESENT") self.close()
def appendQt(self): import qtui self.open() self.write("PYQT.VERSION: %s", qtui.getQtVersionString()) self.write("PYQT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") self.close()
def appendQt(self): import qtui self.open() self.write("PYQT.VERSION: %s", qtui.getQtVersionString()) self.write("PYQT.JPG_SUPPORT: %s", "supported" if qtui.supportsJPG() else "not supported") self.write("PYQT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") py_plugin_path = os.path.pathsep.join( [getpath.pathToUnicode(str(p)) for p in qtui.QtCore.QCoreApplication.libraryPaths()] ) self.write("QT.PLUGIN_PATH: %s" % py_plugin_path) qt_plugin_path_env = os.environ["QT_PLUGIN_PATH"] if "QT_PLUGIN_PATH" in os.environ else "" self.write("QT.PLUGIN_PATH_ENV: %s" % qt_plugin_path_env) qt_conf_present = os.path.isfile(getpath.getSysPath("qt.conf")) if qt_conf_present: from codecs import open f = open(getpath.getSysPath("qt.conf"), "r", encoding="utf-8", errors="replace") qt_conf_content = f.read() qt_conf_content = qt_conf_content.replace("\n", "\n" + (" " * len("QT.CONF: "))).strip() f.close() self.write("QT.CONF: %s" % qt_conf_content) else: self.write("QT.CONF: NOT PRESENT") self.close()