Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Tab Ordering not working properly in widget
Qt 6.11 is out! See what's new in the release blog

Tab Ordering not working properly in widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 912 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.
  • HunterMetcalfeH Offline
    HunterMetcalfeH Offline
    HunterMetcalfe
    wrote on last edited by
    #1

    Hi everyone,

    The issue is the tab order on one of my ui files. I know QT sets tab ordering based upon the order in which the widgets are created in the designer. Luckily this ordering is correct. Furthermore, the tab order in the designer is correct. However, when pressing tab, the ordering is completely off. When I manually set Tab ordering by setTabOrder(widget*, widget*), this tab ordering is not being followed. Here is an example of some of my code.

    setTabOrder(ui->m_tableView, ui->widget);
    setTabOrder(ui->widget, ui->m_editWidget);
    setTabOrder(ui->m_editWidget, ui->m_setInputWidget);
    setTabOrder(ui->m_setInputWidget, ui->m_tableView);

    Just as a note m_editWidget and widget are container widgets of spinboxes and other things. m_setInputWidget is a customer widget that was "promoted" using Qt's promote functionality. From my understanding the tab order should tab to these specific widgets and then tab through those widgets sub widgets through the default QWidget::focusNextPrevChild. So if anyone has any ideas or suggestions to help me, I'd be most appreciative.

    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