|  | Home · Examples

# Qt Designer's Tab Order Editing Mode

[Previous: Qt Designer's Buddy Editing Mode][Qt Designer Manual][Next: Editing Resources with Qt Designer]

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 and, although this order may be sufficient for many users, it is often better to explictly 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 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 tab order chain, and 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. You can continue 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 widget are already in the correct order. Numbers, for which you already set the order, change to green, while those which were not clicked yet, remain blue.

If you make a mistake, simply double click outside of any number or choose "Restart" action from the form's context menu to start again. If you have many widgets on your form and want to change the order in the middle or by the end of tab order chain, you can start edit tab order chain at any position you wish. Just press the control modifier and click the number from which you want to start, or alternatively choose "Start from Here" action from context menu.