Dear All,

I problem is with embedded system environment,I inherit QAction and instances of it is created as submenus for navigation purpose.I want to navigate to other submenu with the keypress event,In other cases where I subclass QWidget related class I was able to use focusNextChild,focusPreviousChild for navigation.How can I achieve the same with QObject subclasses.

I hope this message will be more clear with the code below.

Qt Code:
  1. MyAction::MyAction( const QString & text, QObject * parent ):QAction(text,parent)
  2. {
  4. }
  7. void MyAction::keyPressEvent(QKeyEvent *event)
  8. {
  9. unsigned int keyId;
  10. QString ch("");
  11. switch (event->key())
  12. {
  13. case Qt::Key_Right:
  14. printf("Use Qt::Key_Right\n");
  15. //I Used focusNextChild() for QWidget Subclasses
  16. break;
  17. case Qt::Key_Left:
  18. //I Used focusPreviousChild() for QWidget Subclasses
  19. break;
  20. }
  21. }
To copy to clipboard, switch view to plain text mode 

Thanks in Advance