Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Help for multi menu key events on embedded Linux without display.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 920 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    ploef
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        ploef
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          That part doesn't change

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            ploef
            wrote on last edited by
            #5

            okay thanks

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved