Help for multi menu key events on embedded Linux without display.



  • Hello,

    I'm busy with a project which has several menu's for the user. The project does not use any LCD screen only audio feedback with use op a tts engine. The input is from a keyboard.

    On this I have 4 menu's and every menu has his own QWidget with an QListWidgetItem where the menu items are stored in. When the widget is actived and focus the key events will be capture on this widget.

    The problem with this is, that I now have 4 key events who, because I have 4 QWidgets, every QWidget has his own keyevent who are almost the same.

    For my feeling this is not the way to do it, but I could not find on the internet(or I did not search right) any examples how to that.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If I understand you correctly, you would like to avoid these 4 almost same implementation ? If so, you can create a custom "base widget" where you have the common code and then have your 4 widget derived from that one and implement their specific part.

    Hope it helps



  • Thanks for the reply.

    That is correcyt, I have now almost 4 same implementation. Every widget has his own key event, who almost are exactly the same.

    I would like to have one, but how do I know from which widget the keyevent is active?


  • Lifetime Qt Champion

    That part doesn't change



  • okay thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.