[Qt-interest] Is it possible to put a QComboBox in a table header?

Murphy, Sean M. sean.murphy at gd-ais.com
Mon Jan 18 20:57:13 CET 2010


I'm trying to figure out how to put modify the QHeaderView of a
QTableView so that each header item is a QComboBox.

I'm currently using a QTableView class (maybe I need to use
QTableWidget?) and a model that inherits from QAbstractTableModel.
Right now the model just returns QStrings (as QVariants) from
headerData(), and I don't see a way to return QComboBox items instead.

So is it possible to put functioning QComboBoxes in a table header, and
if so, how do I go about it
Sean




More information about the Qt-interest-old mailing list