QtSpell  0.8.5
Spell checking for Qt text widgets
QtSpell Documentation

Introduction

QtSpell adds spell-checking functionality to Qt's text widgets, using the enchant spell-checking library.

Usage

Simple

To check spelling in a QTextEdit or QPlainTextEdit, proceed as follows:

// create a QtSpell::TextEdit instance
// optional: set the language (by default, the system locale is used)
checker.setLanguage("de_CH");
// attach to a QTextEdit or QPlainTextEdit
QTextEdit textEdit = new QTextEdit();
checker.setTextEdit(textEdit);

If you wish to use undo and redo on a Q{Plain}TextEdit with an attached QtSpell::TextEditChecker, use the undo and redo functionality provided by QtSpell::TextEditChecker, since the corresponding Q{Plain}TextEdit methods do not work correctly when spell checking is enabled.

Advanced

QtSpell::TextEditChecker inherits from the abstract QtSpell::Checker class. You can derive from the QtSpell::Checker class, implementing the interface methods

to create a spell checker for any other widget.

Build instructions

You need to have the enchant, as well as either or both the qt4 and qt5-qtbase development files installed. If you want to build the documentation, you need Doxygen. QtSpell uses CMake as the build system. From withing the QtSpell source directory:

mkdir build
cd build
cmake ..
make
sudo make install
Author
Sandro Mani manis.nosp@m.andr.nosp@m.o@gma.nosp@m.il.c.nosp@m.om
QtSpell::Checker::setLanguage
bool setLanguage(const QString &lang)
Set the spell checking language.
Definition: Checker.cpp:91
QtSpell::TextEditChecker
Checker class for QTextEdit widgets.
Definition: QtSpell.hpp:232
QtSpell::TextEditChecker::setTextEdit
void setTextEdit(QTextEdit *textEdit)
Set the QTextEdit to check.
Definition: TextEditChecker.cpp:107