PDA

View Full Version : How to get click event using Qt creator in my board



shivcena
7th November 2015, 11:15
Actually im running my Qt creator application in my grayhill board . Qt application is working fine but i need to get the click event of the board, because the board having 5 buttons (physical buttons) named as 1 ,2 ,3 ,4,5 . The board is same like beaglebone board. Please refer below, im having exactly same board.
These are the keycode for my device,
keycode 67 = Right
keycode 68 = Up
keycode 69 = Down
keycode 70 = Tab
keycode 71 = Return

how to get these keycode in C++ when clicking corresponding buttons.

11505

anda_skoa
7th November 2015, 11:55
Actually im running my Qt creator application in my grayhill board

Actually you are not. Would be helpful if you would stop repeating that false information.


how to get these keycode in C++ when clicking corresponding buttons.

Key events are delivered to the widget which has the keyboard focus.
Overwrite QWidget::keyPressEvent() and/or QWidget::keyReleaseEvent() or use an event filter.

Cheers,
_