Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, July 2007
QTableWidget::setCellWidget() breaks SelectionMode


Message 1 in thread

I've run into a problem where I do not wish my QTableWidget to have
any selection options so I've set the SelectionMode for the table to
QAbstractItemView::NoSelection and every item in the table has
Qt::ItemIsSelectable cleared. This works nicely however one column of
my table adds a QComboBox using QTableWidget::setCellWidget().

Now the moment the user clicks on the combo box the table header fonts
become bold and the underlying cell is highlighted blue. Is there a
way to prevent this? I've tried creating a cell for this position and
clearing Qt::ItemIsSelectable and this does not work.

If this is not possible is there any way I can change the selection
font for the QHeaderView so it does not change to a bold font when the
user clicks the combo box? As this is the most displeasing aspect?

Any help much appreciated.

Many thanks,
Simon

--
 [ signature omitted ]