I've used the same system: sending a signal when a key has been pressed.
I need to capitalise all the user inputs but not what the gui automatically inserts, so a signal is much more efficient than a validator.
And it's 10 lines 
protected:
{
if (e->key() >= Qt::Key_A && e->key() <= Qt::Key_Z)
emit KeyPressed(e->text().toUpper().at(0));
else
}
signals:
void KeyPressed(const QChar&);
protected:
void keyPressEvent(QKeyEvent* e)
{
if (e->key() >= Qt::Key_A && e->key() <= Qt::Key_Z)
emit KeyPressed(e->text().toUpper().at(0));
else
QLineEdit::keyPressEvent(e);
}
signals:
void KeyPressed(const QChar&);
To copy to clipboard, switch view to plain text mode
Bookmarks