Going with wysota's original suggestion, I've made headway:
{
if ((o
== ui
->dnNameCombo || o
== ui
->dnDescCombo
) && e
->type
() == QEvent::FocusOut) {
// Not sure how to emit returnPressed here
}
}
bool MyClass::eventFilter(QObject *o, QEvent *e)
{
if ((o == ui->dnNameCombo || o == ui->dnDescCombo) && e->type() == QEvent::FocusOut)
{
// Not sure how to emit returnPressed here
}
return QWidget::eventFilter(o, e);
}
To copy to clipboard, switch view to plain text mode
I just don't know how to emit a returnPressed() as he suggests. In the above code, dnNameCombo and dnDescCombo are the objectName properties of my editable QComboBox widgets.
Bookmarks