Spell-Checking-with-Hunspell
Spell Checking with Hunspell
Prerequisites
You have to get Hunspell from http://hunspell.sourceforge.net/ [hunspell.sourceforge.net]. I have tested the classes with version 1.2.8. It may work with a more recent version (current is 1.2.12). Dictionaries can be downloaded via the sourceforge page.
If you plan to use the spell checker in a commercial software, watch out for the copyright and license of the dictionaries!
The source code on this wiki page is released by me (Volker, being the original author) under the 2 clause BSD license [en.wikipedia.org]
You also must adapt a few files before everything works:
The project file SpellChecker.pro:
Adjust the paths to your hunspell installation
dialog.cpp:
In method Dialog::checkSpelling() adjust the paths to the dictionaries. You must provide the base name of the dictionary, excluding the suffixes .dic and .aff. The user dictionary is optional. The path is the complete path to the file, including an extension (which is optional).