- 
    
Bug
 - 
    Resolution: Done
 - 
    
P3: Somewhat important
 - 
    4.8.3, 5.0.0 Beta 2
 - 
    None
 
- 
        efec288f58dc18f6a571bfedf9d19e3fbf12a18f
 
Setting QLineEdit items to a table with setCellWidget() will result wrong tab focus if focus is also changed with mouse.
The code below reproduces the issue with the following steps:
- change the focus first with tabulator to the middle line edit
 - set the focus with mouse to the first line edit
 - use the tabulator again
-> the third line edit will have focus instead of the second/middle one. 
int main(int argc, char *argv[]) { QApplication a(argc, argv); QTableWidget table; table.setRowCount(3); table.setColumnCount(3); QLineEdit *lineEdit; lineEdit = new QLineEdit; table.setCellWidget(1, 0, lineEdit); lineEdit = new QLineEdit; table.setCellWidget(1, 1, lineEdit); lineEdit = new QLineEdit; table.setCellWidget(1, 2, lineEdit); table.resize(400, 200); table.show(); return a.exec(); }
| For Gerrit Dashboard: QTBUG-27793 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 216994,3 | itemviews: When an index widget gets focus, update the current index | dev | qt/qtbase | Status: MERGED | +2 | 0 |