Hi there,

I am trying to get a simple thing running: alowing the user to delete a listviewitem with the "del" key. But it seems that the listview doesn't get that key. Some other keys I tried are not a problem....

It seem that something is catching my keay away?

Any help is welcome

Thanks in advance

Rafael

Qt Code:
  1. void CEngravingDialog::keyPressEvent( QKeyEvent *event )
  2. {
  3. if( listViewElements->hasMouse() )
  4. {
  5. switch( event->key() )
  6. {
  7. case Key_Delete: //Delete if item in listview is selected
  8. ButtonDelete();
  9. break;
  10. default:
  11. QWidget::keyPressEvent( event );
  12. }
  13. }
  14. }
To copy to clipboard, switch view to plain text mode