I need to see your code, but it sounds like you need to pass the keyPressEvent() up to the base class, so something like this:
{
if(ke->key() == Qt::Key_Return)
{
//do something
}
//now pass the keyEvent up to the parent widget,
//here I'm assuming its a QWidget
}
MyWidget::keyPressEvent(QKeyEvent * ke)
{
if(ke->key() == Qt::Key_Return)
{
//do something
}
//now pass the keyEvent up to the parent widget,
//here I'm assuming its a QWidget
QWidget::keyPressEvent(ke);
}
To copy to clipboard, switch view to plain text mode
Bookmarks