hi,

I gone thru the codes you given and understood the concept...
Thank you...

Now i experienced a problem that all keys except arrow keys are detected by QKeyEvent...
Can you tell why arrow keys are not detected...

Or whether the arrow key press are not among QKeyEvent...

Help me plz...


Mahesh


Quote Originally Posted by dec0ding
For Qt 3.3.x:
There is great example in the Documentation. U can simply use QWidget::keyPressEvent()

Qt Code:
  1. void PictureDisplay::keyPressEvent( QKeyEvent *k )
  2. {
  3. switch ( tolower(k->ascii()) ) {
  4. case 'r': // reload
  5. pict->load( name );
  6. update();
  7. break;
  8. case 'q': // quit
  9. QApplication::exit();
  10. break;
  11. }
  12. }
To copy to clipboard, switch view to plain text mode 

Here: http://doc.trolltech.com/3.3/picture-example.html#x127