I've created a QWidget, which contains three QLineEdits. Then I added a overwrote the keyPressEvent so that this lineEdit_3 reacts on key press. Working good.
void MySuperWidget::keyPressEvent(QKeyEvent* keyEv)
{
switch (keyEv->key()) {
case Qt::Key_Up:
//.. stuff
break;
case Qt::Key_Down: {
//.. stuff
}
break;
default:
break;
}
}
BUT the first and second QLineEdit also react on keypress :(
I need somethng like this:
if (sender() != ui->lineEdit_3 ) {
keyEv->ignore();
}