i have two separate widgets in one layout
first widget accepts keyboard shortcuts like this
fnQuantity->setShortcut(Qt::Key_Asterisk);
connect(fnQuantity, SIGNAL(triggered()), this, SLOT(on_editQuantity_clicked()));
this->addAction(fnQuantity);
QAction *fnQuantity = new QAction(this);
fnQuantity->setShortcut(Qt::Key_Asterisk);
connect(fnQuantity, SIGNAL(triggered()), this, SLOT(on_editQuantity_clicked()));
this->addAction(fnQuantity);
To copy to clipboard, switch view to plain text mode
the second widget has some QLineEdit fields and radio buttons on form, some of them are disabled
If one of qLineEdit fields has focus, when i press asterisk on numpad it just types * character in lineedit
if i click on one of disabled fields, or radio butons, and then press * on keyboard the action in first form is executed
I tried with overriding keypressevent on qlineedit, and installing event filter in second form but all i get is that * sign is not typed into QLineEdit, and fnQuantity action is not executed
How can i ignore asterisk sign from line edit... and let other widgets process it...?
Bookmarks