Sonnet
Spellchecking made easy
Spellchecking in your QTextEdit
QTextEdit *textEdit = new QTextEdit;
textEdit->setText(
QString::fromLatin1("This is a sample buffer. Whih this thingg will "
"be checkin for misstakes. Whih, Enviroment, govermant. Whih."));
Sonnet::SpellCheckDecorator *installer = new Sonnet::SpellCheckDecorator(textEdit);
installer->highlighter()->setCurrentLanguage(QStringLiteral("en_US"));class MailSpellCheckDecorator : public Sonnet::SpellCheckDecorator
{
public:
explicit MailSpellCheckDecorator(QTextEdit *edit)
: Sonnet::SpellCheckDecorator(edit)
{
}
protected:
bool isSpellCheckingEnabledForBlock(const QString &blockText) const override
{
qDebug() << blockText;
return !blockText.startsWith(QLatin1Char('>'));
}
};Language Detection in Sonnet
GUI Widgets provided by Sonnet
Last updated