View Full Version : How to respond the reallty button?

9th October 2009, 08:40
Hi, everyone?
I run qt-core on the arm9 board and I connect a really button to the board. And the button driver code is ok. And I want to ask how to do to realize that when I click the really button and qt will connect to a slot just like the pushbutton?
Because I want to use two method the control the slot, one is using the pushbutton(it is easy to realize just use signal and slot); the other is using really button, when I click the button, the qt can do the same thing just like I click pushbutton in the interface. How to realize that , thank you.

18th October 2009, 17:58
What is a "really button"?

18th October 2009, 21:04
I think he means a hardware button, such as on a phone or similar - since this is probably embedded (runs on ARM).

You can achieve what you want by using QKeyEvet.
You will have to know what key code (http://doc.trolltech.com/4.4/qt.html#Key-enum) your button has.
If you don't you can output the key code in the keyPressEvent().