Hi all!
I'm developing a GUI application for a ARM9 based telephone. Presently I write codes and debug under Qt creator 2.1.0 at x86 Ubuntu host. I want to test the application with a conventional USB keyboard connected to a host and later implement all necessary hardware stuff for the embedded platform..
My application has a number of pages created by QStackedWidget. I switch between pages like Menu, Address Book, Parameters etc by pressing QPushButton's. A mouse works fine but I want to use a keypad of a PC-keyboard to handle the necessary logic of the application.
I have a few problems and need your assistance:
1) how should I implement an input system for my application because I need also to scroll letters inputed by a multiple numeric pressings (imaging a cell phone with a keypad, not touchscreen)? I mean if a user enters a Name or a Password he has only "0-9" keys and needs to enter "My_Password123" to some QLineEdit
2) as I have a number of pages with different widgets included how I should capture key events? I try to use keyPressEvent but it depends on a widget being focused, however I need to capture all key event independently to a widget focus.
In fact I can implement a little hack: don't use QWS_KEYBOARD variable and just open a device node "/dev/input/event0" and parse input events manually. This is very easy because Linux input system is trivial. Upon this scenario I don't understand how to translate my acquired events to an Qt-application readable format. In fact I need something like the suggested hack because all numbers have to be translated to letters..
This is my first Qt application and my customer craves for it
Please help!



Reply With Quote



Bookmarks