Use KTextEdit instead of QLineEdit. On most KDE systems this means Spell Check support!