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
Qt Code:
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&);To copy to clipboard, switch view to plain text mode
Bookmarks