RFC: spell checking for QTextEdit

Kevin Krammer krammer at kde.org
Wed Aug 7 11:44:19 UTC 2013


On Wednesday, 2013-08-07, Aurélien Gâteau wrote:

> More on this topic, Alex Fiestas suggested a new option:
> 
> C) Add spellchecking to QTextEdit itself:
> - Extend QTextEdit with new properties to enable spellchecking, set
> spellchecking language...
> - Add a spellcheck syntax highlighter
> - Extend QPA to integrate with the platform spellchecking API.

The main problem is whoever proposes this will be asked to at least implement 
it for Windows and OSX as well, assuming those platforms have native 
spellchecking APIs.

> Pros:
> - Sounds like the proper way to do it in the long run: it provides proper
> platform integration (Android spellchecking suggestion is not done with a
> context menu for example)
> - Could also be used to bring spellchecking to other widgets like
> QLineEdit? I know KMail could use this for its subject line edit, which is
> right now a custom one-line KTextEdit.

The spellchecking itself (minus the UI) might actually be something the 
QTextDocument or a helper class for it would provide. Different paragraphs 
could have different languages, etc.

> - Less work to port KDE apps to KF5: KTextEdit => QTextEdit + calling
> QTextEdit::setSpellCheckingEnabled(true)
> 
> Cons:
> - More work, not sure it can be done in time for Qt 5.2.
> 
> 
> I am tempted to say B) in the short term since it's mostly done, then C),
> but this could mean KDE apps would be first changed to use
> Sonnet::TextEditInstaller, only to drop it when QTextEdit gains the
> feature.

I think we will see things like that anyway, i.e. functionality available in 
KDE Framworks becoming important enought to make it viable for Qt upstreaming.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130807/3be971d6/attachment.sig>


More information about the Kde-frameworks-devel mailing list