Hi,
exists some qt class which adds spell checking to editable fields like lineedits or textedits; i don't found anything in the documentation. My needs are very poor: a simple mark on the wrong word (not correction feature).
Thanks
Hi,
exists some qt class which adds spell checking to editable fields like lineedits or textedits; i don't found anything in the documentation. My needs are very poor: a simple mark on the wrong word (not correction feature).
Thanks
Giuseppe CalÃ
You can go with aspell: http://aspell.net/.
by any chance do you have any tutorial of how to integrate Aspell to QT QtextEdit???
Implement a syntax hghlighter that calls ASpell for each word using this API for example: http://aspell.net/man-html/Through-t...ough-the-C-API
I found this project
Online spell check editor
which suit my needs. If needed I can give you some code for help.
Giuseppe CalÃ
arturo182 (10th April 2009)
Thx, if you can do that I REALLY APPRECIATE!!!
First list of attachments...
Giuseppe CalÃ
Put all these files in your project src dir (see attachment in this and my previous post):
spelltextedit.h
spelltextedit.cpp
highlighter.h
highlighter.cpp
Aspell.h
Aspell.cpp
ThreadQueue.h
ThreadQueue.cpp
Now you can reuse the new widget SpellTextEdit like a normal QTextEdit, just "#include spelltextedit.h".
This code is different from that in the last version of "Online spell check editor"; this uses aspell instead of hspell; more: the language is hardcoded in highlighter.h so if needed look there.
Regards
Giuseppe CalÃ
This needs something else from aspell?
Can you please elaborate how to use these files within project. I want to add spell checking functionality to my QtextEdit.
Simply use SpellTextEdit instead of QTextEdit (remember to edit highlighter.h for setting your language). Just a little example:
Qt Code:
#include <QApplication> #include "spelltextedit.h" int main(int argc, char *argv[]) { SpellTextEdit *spellTextEdit = new SpellTextEdit; spellTextEdit->show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
Attached are 2 files; use these instead of those in my previous posts;
Bye
Giuseppe CalÃ
Bookmarks