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. 5 Keys Input and Menu handling?
Forum Updated to NodeBB v4.3 + New Features

5 Keys Input and Menu handling?

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 2 Posters 2.0k Views 2 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.
  • B Offline
    B Offline
    BluTiGeS
    wrote on last edited by
    #1

    Hi all,

    I have started with QT and I am a little bit frustrated right now.
    I thought I would be able to use QT 4.8.6 Embedded to develop a LCD GUI with Menus and Input,Combo,Select Boxes, only using a 5 Button Input Key design.

    It looks similiar to this:
    http://emsystech.de/wp-content/uploads/2012/09/raspi-lcd-1.jpg

    I have tried navigation using connect and the signalmapper, but up down postEvent does not do anything.
    And using the focusNextElement function and previousElement are not in x and y axis, so this is not a good choice ;/

    But I have several issues at the moment:

    • How to navigate with up, down, left ,right in a grid menu?
    • How can I use the input to enter for e.g. a hostname with only a 5 button system?
      I thought i just can use the input and increment/decrement the char?
    • Is there any plugin/help like other embedded devices handle this with QT?
      I know there are other libraries like Ramtex, ucGUi and so on, but QT should be able to handle this also right?

    Please if you have any advise or help I would really appreciate it.

    Many Thanks

    Regards

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

      Hi,

      1. If you use something like a QListView in IconMode you can navigate like with a standard keyboard (provided that your custom 5 button system is seen as a keyboard by your Raspberry Pi)

      2. A virtual keyboard would be required here, you can either do it phone style where you have the letter on the keypad or use a full virtual keyboard.

      3. Do you mean a plugin to e.g. map your 5 button thingy ?

      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
      • B Offline
        B Offline
        BluTiGeS
        wrote on last edited by
        #3

        Thanks.

        1. Sounds like a good navigation helper.

        2. Isnt it possible without such a keyboard? like gettin a input field if it go focus than get actual "cursor" position and just get the char and increase descrese it and on click right or left move the focus of the string?
          Is this ugly or sounds like a good plan? Since a virtual keyboard would require moving in x and y cordinates and not tap based. Or is it possible to use QT to move the focus in this x y way ? I just found the next/PrevFocus function right now.

        3. Not really a plugin, but maybe someone has done such a project and could share his project, so that I can get into it.

        Many Thanks

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4
          1. I was thinking "console video game" style where you often had a full keyboard and moved over to the right letter and push e.g. a to validate. However in your case an "old phone" (as in not smartphone) key pad might be better. But in the end its your screen size and target market that should help you decide. You can use an event filter or reimplement the corresponding methods in your widget to do special handling.

          2. There's still the question: how does your RPI see that extension ? Are they just five button and you have to handle them by hand ? Is it a keyboard ?

          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
          • B Offline
            B Offline
            BluTiGeS
            wrote on last edited by
            #5

            HI,

            1. Yes the target display has only 240x120 Dots Resolution and we only have these 5 Keys . No additional kayboard attached. Okay the Event filter thing could be helpful. Is it also available in QT to do a special event filter for Inputs, Comboxes? Otherwise I would need to get the focused Widget and get the regarding object somehow?

            2. We are not using a RPI, the RPI was just a look a like graphic ;). We are using a custom board which has only these 5 Buttons attached (similar to the image of the RPI). As far as I can see for now I think, we need to provide a own keyboard driver for these 5 buttons. But we wont have more buttons and no touch screen. So it is hard for me to handle it since I have worked with touch based devices only, until now.

            Regards

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

              Since you're on 4.8, QWSKeyboardHandler might be of interest if you don't have a kernel driver that turns your five buttons into a system keyboard. If you map these buttons with up/down/left/right and enter you have the basics or your navigation and would need to essential work on moving the focus from one widget to the other.

              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
              • B Offline
                B Offline
                BluTiGeS
                wrote on last edited by
                #7

                I got it working today with the QWS KEYPAD define switch and setNavigationMode .

                Now i can navigate as I thought, but now I have the next questions:

                • How can I handle dynamic ListWidget menus, which must be possible to navigate forward and backward?
                  My approach was QVector containing the QWidgetListItem*, but I will always have the ui->ListWidget_Submenu for all submenus, so I cannot clearly decide which action should be done for which List Item.

                Also it is not really clear at the moment how to handle the menu. In worst case I need to have a menu map in the background which always gets updated if the list gets changed and the user wants to move back. Hmmmm.

                Is there a nicer way to handle such List Menus with Submenus? I do not want to create a new ListWidget for each Submenu ;(.

                -MENU Entry -> emit some function
                -MENU 2 -> SubMenuItems ->SubMenuItems ->Items->Dialogs etc.
                -MENU 3 -> SubMenuItems ->SubMenuItems ->Items->Dialogs etc.

                Is it possible to set unique identifiers for each ListItem and also get it back during the Slot call? clicked etc.?
                So it would be possible to say what action should be done.

                • Another issue I am focusing right now is that comboboxes can be selected with end with Key_Select they drop down, but it is not possbile to select an item in the drop down list. The focus moves forward to the next element. So how can I select such combobox item? Special EventFilter , but for what exactly?

                Regards

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

                  I don't know whether you saw this but I think you should take a look at the QtGamepad module. It might simplify things for your use case

                  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

                  • Login

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