Added version checking for Qt5 and PyQt5 dependencies

This commit is contained in:
Veronica K. B. Olsen
2019-09-14 11:41:24 +02:00
parent 5e5f5d3e0b
commit 57929a1138
4 changed files with 49 additions and 2 deletions
+2 -1
View File
@@ -144,7 +144,8 @@ class GuiDocEditor(QTextEdit):
# Also set the document text options for the document text flow
theOpt = QTextOption()
if self.mainConf.tabWidth is not None:
theOpt.setTabStopDistance(self.mainConf.tabWidth)
if self.mainConf.verQtValue >= 51000:
theOpt.setTabStopDistance(self.mainConf.tabWidth)
if self.mainConf.doJustify:
theOpt.setAlignment(Qt.AlignJustify)
self.qDocument.setDefaultTextOption(theOpt)
+3
View File
@@ -57,6 +57,9 @@ class GuiMain(QMainWindow):
self.theIndex = NWIndex(self.theProject, self)
self.hasProject = False
logger.info("Qt5 Version: %s (%d)" % (self.mainConf.verQtString, self.mainConf.verQtValue))
logger.info("PyQt5 Version: %s (%d)" % (self.mainConf.verPyQtString, self.mainConf.verPyQtValue))
self.resize(*self.mainConf.winGeometry)
self._setWindowTitle()
self.setWindowIcon(QIcon(path.join(self.mainConf.appIcon)))