diff --git a/novelwriter/__init__.py b/novelwriter/__init__.py index 5c13cde9..4ba051c1 100644 --- a/novelwriter/__init__.py +++ b/novelwriter/__init__.py @@ -214,14 +214,14 @@ def main(sysArgs=None): "At least Python 3.7 is required, found %s" % CONFIG.verPyString ) errorCode |= 0x04 - if CONFIG.verQtValue < 50900: + if CONFIG.verQtValue < 51000: errorData.append( - "At least Qt5 version 5.9 is required, found %s" % CONFIG.verQtString + "At least Qt5 version 5.10 is required, found %s" % CONFIG.verQtString ) errorCode |= 0x08 - if CONFIG.verPyQtValue < 50900: + if CONFIG.verPyQtValue < 51000: errorData.append( - "At least PyQt5 version 5.9 is required, found %s" % CONFIG.verPyQtString + "At least PyQt5 version 5.10 is required, found %s" % CONFIG.verPyQtString ) errorCode |= 0x10 diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 2c908c2f..cc96b9e9 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -303,10 +303,7 @@ class GuiDocEditor(QTextEdit): self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) # Refresh the tab stops - if self.mainConf.verQtValue >= 51000: - self.setTabStopDistance(self.mainConf.getTabWidth()) - else: # pragma: no cover - self.setTabStopWidth(self.mainConf.getTabWidth()) + self.setTabStopDistance(self.mainConf.getTabWidth()) # Initialise the syntax highlighter self.highLight.initHighlighter() diff --git a/novelwriter/gui/docviewer.py b/novelwriter/gui/docviewer.py index 5c9ae4ab..1f14f165 100644 --- a/novelwriter/gui/docviewer.py +++ b/novelwriter/gui/docviewer.py @@ -150,10 +150,7 @@ class GuiDocViewer(QTextBrowser): self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) # Refresh the tab stops - if self.mainConf.verQtValue >= 51000: - self.setTabStopDistance(self.mainConf.getTabWidth()) - else: # pragma: no cover - self.setTabStopWidth(self.mainConf.getTabWidth()) + self.setTabStopDistance(self.mainConf.getTabWidth()) # If we have a document open, we should reload it in case the font changed if self._docHandle is not None: @@ -193,10 +190,7 @@ class GuiDocViewer(QTextBrowser): return False # Refresh the tab stops - if self.mainConf.verQtValue >= 51000: - self.setTabStopDistance(self.mainConf.getTabWidth()) - else: # pragma: no cover - self.setTabStopWidth(self.mainConf.getTabWidth()) + self.setTabStopDistance(self.mainConf.getTabWidth()) # Must be before setHtml if updateHistory: diff --git a/novelwriter/tools/build.py b/novelwriter/tools/build.py index 1518a079..d2b3faf7 100644 --- a/novelwriter/tools/build.py +++ b/novelwriter/tools/build.py @@ -1265,10 +1265,7 @@ class GuiBuildNovelDocView(QTextBrowser): self.setFont(theFont) # Set the tab stops - if self.mainConf.verQtValue >= 51000: - self.setTabStopDistance(self.mainConf.getTabWidth()) - else: # pragma: no cover - self.setTabStopWidth(self.mainConf.getTabWidth()) + self.setTabStopDistance(self.mainConf.getTabWidth()) docPalette = self.palette() docPalette.setColor(QPalette.Base, QColor(255, 255, 255))