33 lines
611 B
C++
33 lines
611 B
C++
|
#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);
|
||
|
}
|