Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Mobile and Embedded
    embedded linux qt5.2.1 qtcreator navigation arrowkeys enter key selection stackedwidget
    1
    1
    1306
    Loading More Posts
    • 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
      Ajith_P_V last edited by

      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 Reply Quote 0
      • First post
        Last post