PDA

View Full Version : QTableView: Simplest way to find the index of a column name in the horizontalHeader?



trapanator
14th September 2010, 12:02
Hi,

I have a QtableView.

What's the simplest way to find the column index of a QString in the horizontalHeader() ?

wysota
14th September 2010, 17:26
Iterate over columns of the table and compare the string against the values from QAbstractItemModel::headerData() of the model connected to the view.