From 324370497e34a82f782a0806a3aba5e5efeaab90 Mon Sep 17 00:00:00 2001 From: Glutanimate Date: Wed, 6 Mar 2019 14:18:26 +0100 Subject: [PATCH] Set QTWEBENGINE_DICTIONARIES_PATH This introduces the possibility for add-ons to supply spell checking support in web views. --- aqt/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aqt/main.py b/aqt/main.py index 5ef98e1f4..1ba359950 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -73,6 +73,7 @@ class AnkiQt(QMainWindow): self.setupThreads() self.setupMediaServer() self.setupSound() + self.setupSpellCheck() self.setupMainWindow() self.setupSystemSpecific() self.setupStyle() @@ -637,6 +638,10 @@ title="%s" %s>%s''' % ( if not self.safeMode: self.addonManager.loadAddons() + def setupSpellCheck(self): + os.environ["QTWEBENGINE_DICTIONARIES_PATH"] = ( + os.path.join(self.pm.base, "dictionaries")) + def setupThreads(self): self._mainThread = QThread.currentThread()