Spell checking works but does not underline misspelled words #147

This commit is contained in:
Olivier Keshavjee 2017-10-15 22:45:57 +02:00
parent aed93550f2
commit 67efc47a18

View file

@ -88,6 +88,7 @@ class basicHighlighter(QSyntaxHighlighter):
if self.editor._dict and not self.editor._dict.check(word_object.group()):
format = self.format(word_object.start())
format.setUnderlineColor(self._misspelledColor)
format.setUnderlineStyle(QTextCharFormat.SpellCheckUnderline)
# SpellCheckUnderline fails with some fonts
format.setUnderlineStyle(QTextCharFormat.WaveUnderline)
self.setFormat(word_object.start(),
word_object.end() - word_object.start(), format)