PDA

View Full Version : disable header selection in QTableView



stef13013
19th September 2010, 17:34
Hi, With a QTableView / QStandardItemModel I use:

qv->setSelectionBehavior(QAbstractItemView::SelectRows );
qv->setSelectionMode(QAbstractItemView::SingleSelectio n);

Sounds good, but when I'm selecting a row on the grid, each cells of the horizontal header are selected too (pushed button like) :(

Do you know how to prevent this ?

Thanks...

ChrisW67
19th September 2010, 22:15
QHeaderView::setHighlightSections() looks promising