There have 2 Qt program.
One is a normal program have QComboBox it isn't I design.
I design another, after startup it hide and if keep press KEY_POWER 2 sec it show, you can press KEY_TAB/KEY_LEFT/KEY_DOWN move focus between two buttons.
By the way. For get keyboard input on hiding, my method is read from /dev/input/event0 on thread if read KEY_POWER 2 sec show it.
void *ThreadMinitorKey(void *arg)
{
struct input_event key_event;
fd = open("/dev/input/event0", O_RDONLY);
while(1) {
len = read(fd, &key_event, sizeof(key_event));
if (len != -1 && key_event.type == EV_KEY) {
if (press_KEW_POWER_2_sec()) {
g_dialog->show();
}
}
}
}
Run well
focus on the QComoBox
press keyboard KEY_POWER 2 second my window show,the focus on left button.
Attention to the QComboBox, it background from blue to white.
press KEY_LEFT/KEY_TAB/KEY_RIGHT focus move to other button.
Run error
QComboBox on popup
press keyboard KEY_POWER 2 second my window show,the focus on left button.
The QComboBox background still blue.
press KEY_DOWN the effect on the QComobox