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. Taborder of Customized widegt
Qt 6.11 is out! See what's new in the release blog

Taborder of Customized widegt

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.9k 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.
  • K Offline
    K Offline
    Kritika
    wrote on last edited by
    #1

    I have designed custom widgets. While using them in other application designed in Qt Creator, their tab order is being set as in the order they are created, but when i am trying to change tab order using 'Edit Tab-order'(option in Qt Designer), numbering is changing but the order is not changing on execution.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vittalonline
      wrote on last edited by
      #2

      Hi kritika,

      hope thi following code useful

      void QWidget::setTabOrder ( QWidget * first, QWidget * second )
      Puts the second widget after the first widget in the focus order.

      Note that since the tab order of the second widget is changed, you should order a chain like this:

      setTabOrder(a, b); // a to b;

      setTabOrder(b, c); // a to b to c;

      setTabOrder(c, d); // a to b to c to d;

      write a slot for change the order of every clicking signal until what you want.

      not like this:
      //********* WRONG********
      setTabOrder(c, d); // c to d;

      setTabOrder(a, b); // a to b AND c to d;

      setTabOrder(b, c); // a to b to c, but not c to d;

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kritika
        wrote on last edited by
        #3

        I have also tried this method in code, but it was also not changing the taborder accordingly

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

          Try rebuild your project:
          Clean All
          Run qmake
          Rebuild All

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vittalonline
            wrote on last edited by
            #5

            Hi kritika,

            i think you missed or didnt properly use update() method after changing tab order.send your code link or sample snippet try to solve this problem.

            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