Sh3/comboboxmod.cpp

33 lines
611 B
C++
Raw Normal View History

2025-07-02 07:45:34 +03:00
#include "comboboxmod.h"
comboboxmod::comboboxmod(QWidget *parent) :
QComboBox(parent)
{
uid =0;
}
void comboboxmod::keyPressEvent(QKeyEvent *e)
{
int c=e->key();
bool fl = true;
if (e->modifiers() & Qt::AltModifier)
{
switch (c) {
case 0x31:
case 0x32:
emit activate1(c);
fl = false;
break;
default:
break;
}
}
if ((uid==0x32)&&(c==Qt::Key_Right)) fl = false;
if ((uid==0x32)&&(c==Qt::Key_Tab)) fl = false;
if (fl) QComboBox::keyPressEvent(e);
}