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. How to use Arrows key and Enter key for navigation/selection in a stacked widget Qt5 application?
Forum Updated to NodeBB v4.3 + New Features

How to use Arrows key and Enter key for navigation/selection in a stacked widget Qt5 application?

Scheduled Pinned Locked Moved Mobile and Embedded
embedded linuxqt5.2.1qtcreatornavigationarrowkeysenter keyselectionstackedwidget
1 Posts 1 Posters 1.6k 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.
  • A Offline
    A Offline
    Ajith_P_V
    wrote on last edited by
    #1

    Hi all,
    I have a small application that using a MainWindow and inside the main window, I have a stacked widget with push buttons,check-box and linefeed across multiple pages (stacked widget pages).
    Currently, when I clicked (mouse click) on either of widget item from Qt creator execution (on Host PC), then the desired action is performing. But I can't use mouse in my target platform.
    I want to do the navigation(UP_ARROW,LEFT_ARROW,RIGHT_ARROW,DOWN_ARROW) and selection (ENTER KEY) with the same application instead of mouse click.
    How I can tell ENTER key is for selection and Arrow keys are for navigation in Qt5?
    I came to know about "eventFilter" concept for detecting these keys. But apart from detecting these keys, how I can say one key to perform the desired action through out my application?
    For Example, When ENTER key is detected/pressed, then it should "press/click" the current/focused push button.

    Any idea or code snippet example would be appreciated.

    Thank you in advance,
    Ajith P V

    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