shortcuts customization: handle numpad keys as numpad keys
This commit is contained in:
parent
48a6cf3c9e
commit
85d6e4b0fd
|
|
@ -298,10 +298,12 @@ class Single_QKeySequenceEdit : public QKeySequenceEdit
|
|||
protected:
|
||||
void keyPressEvent( QKeyEvent *e ) override {
|
||||
QKeySequenceEdit::keyPressEvent( e );
|
||||
if( e->modifiers() & Qt::KeypadModifier ) //. workaround Qt issue: Qt::KeypadModifier is ignored
|
||||
setKeySequence( QKeySequence( keySequence()[0] | Qt::KeypadModifier ) );
|
||||
if( QKeySequence_valid( keySequence() ) )
|
||||
clearFocus(); // trigger editingFinished(); via losing focus 🙉
|
||||
// because this can still receive focus loss b4 getting deleted (practically because modal msgbox)
|
||||
// and two editingFinished(); b no good
|
||||
// and two editingFinished(); b no good
|
||||
}
|
||||
void focusOutEvent( QFocusEvent *event ) override {
|
||||
editingFinished();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user