PDA

View Full Version : How to set focus to QTableWidget's cellWidget



danczer
17th February 2011, 18:20
I use QTableWidget to manage my custom widget. When i double click on the table row, i create new row then span the whole row into 1 column and then i use setCellWidget to insert my custom widget.

My issue is, when i press or hold the TAB key the cellWidget do not get focus. I try to use setFoucus() and clearFocus on the tableWidget but nothing, i also try to change focusPolicy-s but nothing. The TAB key allways change between QTableWidget rows and when the selection arrive to the cellWidget it is simple skip it.

It is possible to manage focus inside cellWidget?

danczer
21st February 2011, 17:12
I found the solution. I disabled the tabKeyNavigation property at tableWidget.