KeyPressEvent and QLineEdit question
I have a clear "leUserInput" (a QLineEdit widget). When certain other conditions are met, I want to intercept a key stroke before it is displayed in the "leUserInput" to make changes to some "pushButton" options that were available before this key stroke.
Any help would be appreciated
Re: KeyPressEvent and QLineEdit question
If you're 100% sure this must happen before the key press event reaches line edit, reimplement QWidget::keyPressEvent() (or install an event filter). However, if you're happy with getting informed immediately afterwards, you could simply connect to QLineEdit::textChanged() or QLineEdit::textEdited().