It seems I can not display the horizontal title when I select one row in a QTableWidget .
Example:

How can I prevent header selection? This only happens when one row is in the table. If it has more than two lines, then it works as expected, and only the line itself is selected.
Note. I have installed
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
so that the entire row is selected when the user clicks on the cell.
select qt header qtablewidget
Nathan osman
source share