Taborder of Customized widegt



  • 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.



  • 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;



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



  • Try rebuild your project:
    Clean All
    Run qmake
    Rebuild All



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.