Qt Code:
  1. #include <QtGui/QApplication>
  2. #include <QtGui/QDialog>
  3. #include <QtGui/QTableWidget>
  4. #include <QtGui/QVBoxLayout>
  5. #include <QtGui/QLineEdit>
  6. int main(int argc, char *argv[])
  7. {
  8. QApplication a(argc, argv);
  9. QVBoxLayout vboxLayout;
  10. w.setLayout(&vboxLayout);
  11. QLineEdit edit(&w);
  12. vboxLayout.addWidget(&edit);
  13. QTableWidget table(&w);
  14. table.setRowCount(1);
  15. table.setColumnCount(3);
  16. table.setTabKeyNavigation(false);
  17. vboxLayout.addWidget(&table);
  18. QLineEdit edit2(&w);
  19. vboxLayout.addWidget(&edit2);
  20. w.show();
  21. a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
  22. return a.exec();
  23. }
To copy to clipboard, switch view to plain text mode 
I observe a strange behaviour of the tab order in this form. At start it has the order: edit->table->edit2, after the editing of any column the tab order change to: edit->edit2->table. Can anyone tell me why it happen? I am in the doubts