Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3236336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:36:37+00:00 2026-05-17T17:36:37+00:00

I work on a Qt application in an embedded system and I only have

  • 0

I work on a Qt application in an embedded system and I only have a remote on which the main key is Key_space.

So, I would like to have a QComboBox on which you can select an item when pushing the Key_space button.

How to do it ? Maybe I should inherit from QComboBox and redefine keyPressEvent ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:36:37+00:00Added an answer on May 17, 2026 at 5:36 pm

    If Qt doesn’t already handle this (and I would think it did, but could be mistaken), then you’ll need to do a bit more than just handle the key press event in the combo box. When you are selecting an item for a combo box, another window has been shown with the list of items in it. You would need to handle the key press event for that window, somehow.

    To do that, I would suggest inheriting from QComboBox, and install an event filter on the pop up that is shown (look at the showPopup(), hidePopup(), and view() functions). Make a slot that connects to the highlighted signal, and keep track of which index is highlighted. Then, when the popup window gets a space key event, hide the popup and set the current index to the last highlighted index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The company where I work created this application which is core to our business
I have to present some 'process' or 'flow' of the application at work on
I work on an application that uses DCOM to communicate between what are essentially
I work on an application that has a both a GUI (graphical) and API
In an application I work on, any business logic error causes an exception to
I'm working on an application for work that is going to query our employee
I'm creating a web application for work where the user has to enter the
I've a application that must work after another application. This second application has a
Weve recently been trying to work on an application that uses pandastream to encode
I work on a complex application where different teams work on their own modules

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.