I need Help! please! Emulator Arrow keys
I want to do an emulator Arrow Keys to chose any Button on the same window, Please see the Photo, which i attached. Any Idead!!http://cdn04.trixum.de/upload2/105400/105383/1/1d37e421c3ef444a2acc69b47fd9ec231.jpg(Arrow Keys)!
Do you mean like the classic asdw keys in games ?
Rondog last edited by
Unless I misunderstand this it shouldn't be too difficult.
Create an array of buttons (say 26, broken into 5 rows, one row with only two buttons). The buttons are put into a grid layout according to how you want to set this up.
The index of the active button will decide which one to decorate when it is re-drawn. Some sort of custom paint event to handle this would probably be the best.
The Left/Right increment or decrement the active button index by 1.
The Up/Down increment or decrement the index by the nominal number of buttons in a row (6 in the above example).
Just make sure the index stays within the range (not less than zero or greater than the max index - 25).
You would over-ride the keypressEvents() to capture this the keys.
thanks alot for your answer, you are maybe right, i mean as remote control, there is many buttons, radioButton, time, lineEdite and others on the same Window and there is a Arrow keys.
What i want it is to change date or name or any thing only throught this Arrow keys.
thanks alot for your answer, your Idea is very good, but if i have some lineEdit or Radiobutton it would be diffecult.
On the Window i should be able to set the time and change it and like this.
I am looking for good Idea for all Widgets.