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. Qt Keypad Navigation
QtWS25 Last Chance

Qt Keypad Navigation

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

    Hi,

    We have a custom Linux board with a touchscreen and a keypad (navigation keys) on which we are running Qt 4.7.1. I want to use the keypad for navigation in our Qt application using the Up, Down, Left and Right keys. After reading the docs I discovered that this is possible by building Qt with QT_KEYPAD_NAVIGATION defined.

    I have rebuilt Qt according to this and use QApplication::setNavigationMode() in our application to set the mode to Qt::NavigationModeKeypadDirectional.

    We can now navigate using the keypad but when navigating from a button to an adjacent scroll area only the scroll area gets focus and it is not possible to navigate to the widgets inside the scroll area. We have the same problem when navigation to a ListWidget, it is not possible to use the up and down key to navigate in the list. Do we need to use any other buttons to be able to “enter” a scroll area or navigate in a ListWidget?

    As we have this problem and we are not totally satisfied on how the navigation behaves in our application. We are thinking of writing our own navigation functionality by installing an eventfilter and listening to the KeyPress events.

    But here we get in to the next problem and that is that we don’t get any events when pressing the Left and Right keys. We set the navigation mode to Qt::NavigationModeNone now we get Key events when pressing the up and down keys. But when pressing the left end right keys we don’t get any events and the focus is moved in our application according to the tab order. It’s a similar behavior as when the mode is set to Qt::NavigationModeKeypadTabOrder but with the Left and Right keys instead.

    How do I completely disable the tab functionality support so that I can receive KeyPress events from all navigation keys?

    I have also recompiled Qt without QT_KEYPAD_NAVIGATION defined but then focus is moved according to tab order for all navigation keys (Up, Down, Left and Right).

    Thanks,
    Anders

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BluTiGeS
      wrote on last edited by
      #2

      HI,

      did you find a solution for it I am currently struggeling with nearly the same.
      We have a interactive content and scrolling is only possible if setting focus to the first element in the scrollarea (Tab scroll) or on the scrollbar which would then leave the focus of the content (only applicable for displayin content).

      How have you achieved it to get it working with the keypad navigation?

      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