hy,
I have a keypad in dev/input/event0
I can read in the value like that :
main :
if ((fd = open( "dev/input/event0", O_RDONLY)) < 0) {
perror("evtest");
exit(1);
}
while (1)
{
rd = read(fd, ev, sizeof(struct input_event) * 64);
}
i want to use this value in an qt application but i can't put this in the main of my qtapp because the wile(1) stop the application and i can't do app->exec();
how can i do?
- use a thread : one to read my keypad and the other can do app->exec() to start my Qt application.
- or there is a mean to use the input event of linux like some event in a qt window but i don't know how i can that.
Bookmarks