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. How do you tab into the fields of a tab box if the tab box is dynamically generated?
Forum Updated to NodeBB v4.3 + New Features

How do you tab into the fields of a tab box if the tab box is dynamically generated?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 536 Views 2 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.
  • P Offline
    P Offline
    psigil
    wrote on last edited by
    #1

    I currently have a form with some Line Edit fields and a tab box below. This tab box is populated with three selectable tabs that each have their own unique line edit fields. I would like to be able to tab from the main form's line edit fields into the line edit fields of whatever tab is currently being displayed.

    I cannot just set the tab order through QT Designer because the tab box is dynamically generated.

    Any help would be appreciated.

    Thanks!

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Just take a look at the generated code for the ui file and you will find QWidget::setTabOrder()

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • P Offline
        P Offline
        psigil
        wrote on last edited by
        #3

        Ok, I see in the generated code that setTabOrder() is called for each widget in the form.

        Can I still use the .ui file and overwrite the tabbing behaviour using setTabOrder() or does this mean that I have to impliment the form without a .ui file?

        mrjjM 1 Reply Last reply
        0
        • P psigil

          Ok, I see in the generated code that setTabOrder() is called for each widget in the form.

          Can I still use the .ui file and overwrite the tabbing behaviour using setTabOrder() or does this mean that I have to impliment the form without a .ui file?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @psigil
          Hi
          Using an UI file is 100% the same as using plain code.
          The UI files is converted to C++ code which is run in
          setupUI() function
          so after that function you can just change it with setTabOrder
          all you wish.

          1 Reply Last reply
          3

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved