PDA

View Full Version : How can I associate arrow keys?



Mariane
20th January 2006, 17:39
I can associate buttons to keyboard letters (&<Letter>), but I would like to
associate arrows instead. How can I do this?

Also, is there a way to stop the buttons flickering when the key is kept
pressed?

Also, is there a way to associate a keyboard key without having to hold
down "Alt" (or "Control") at the same time?

Thank you

Mariane

jacek
20th January 2006, 17:48
You might try something like:
_button->setAccel( Qt::Key_Right );

Mariane
20th January 2006, 19:31
I tried:

QPushButton *forwards = new QPushButton( "&I_Forwards", this, "forwards" );
(...)
forwards->setAccel( Qt::Key_Right );

It compiled and worked fine (as soon as I stopped trying to make it go forwards
with the forwards key :o )

Thank you.

Mariane