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 8106803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:34:32+00:00 2026-06-06T00:34:32+00:00

If I don’t re-implement QMainWindow::showEvent() (which will contains a setFocus() method for that widget),

  • 0

If I don’t re-implement QMainWindow::showEvent() (which will contains a setFocus() method for that widget), is there any way to let some widget get focused first, when the window is loaded ? I use form editor of Qt4, but failed to find somewhere to configure that.

  • 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-06-06T00:34:35+00:00Added an answer on June 6, 2026 at 12:34 am

    You can set the Tab Order in Qt Designer or the Designer component in Qt Creator. The first widget in the tab order should get focus on load.

    tab order

    Many users expect to be able to navigate between widgets and controls
    using only the keyboard. Qt lets the user navigate between input
    widgets with the Tab and Shift+Tab keyboard shortcuts. The default tab
    order is based on the order in which widgets are constructed. Although
    this order may be sufficient for many users, it is often better to
    explicitly specify the tab order to make your application easier to
    use.

    Setting the Tab Order

    To enter tab order editing mode, open the Edit menu and select Edit
    Tab Order
    . In this mode, each input widget in the form is shown with a
    number indicating its position in the tab order. So, if the user gives
    the first input widget the input focus and then presses the tab key,
    the focus will move to the second input widget, and so on.

    The tab order is defined by clicking on each of the numbers in the
    correct order. The first number you click will change to red,
    indicating the currently edited position in the tab order chain. The
    widget associated with the number will become the first one in the tab
    order chain. Clicking on another widget will make it the second in the
    tab order, and so on.

    Repeat this process until you are satisfied with the tab order in the
    form — you do not need to click every input widget if you see that
    the remaining widgets are already in the correct order. Numbers, for
    which you already set the order, change to green, while those which
    are not clicked yet, remain blue.

    If you make a mistake, simply double click outside of any number or
    choose Restart from the form’s context menu to start again. If you
    have many widgets on your form and would like to change the tab order
    in the middle or at the end of the tab order chain, you can edit it at
    any position. Press Ctrl and click the number from which you want to
    start. Alternatively, choose Start from Here in the context menu.

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

Sidebar

Related Questions

Don't ask why, but is there any way to suppress a failed linking error?
Don't know if there is a better way to do this, so that is
Don't know how to google for such, but is there a way to query
I don't want to know a way to preload images, I found much on
(Don't know if this is strictly on-topic, but I don't see any better Stack
Don't think that I'm mad, I understand how php works! That being said. I
Don't be afraid to use any technical jargon or low-level explanations for things, please.
Don't overthink this - there's a very commonly used term and I ... have
Don't know what's wrong here, when I run the application it says Specified method
Don't know if this is the right place to ask this, but I will

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.