Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 702

How to keep header from being selected when there is one item in a QTableWidget?

$
0
0

I can't seem to keep the horizontal header from being selected when I select a single row in a QTableWidget.

Example:

alt text

How can I prevent the header from being selected too? This only happens when one row is in the table. If it has more than two rows, then it works as expected and only the row itself is selected.


Note: I have set

ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);

so that the entire row is selected when the user clicks a cell.


Viewing all articles
Browse latest Browse all 702

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>