October 14, 2011

fluca1978 fluca1978
Lab Rat
524 posts

QHeaderView: get numeric column index by name

 

Hi,
is it possible to get the column index number by a column textual name? I don’t find any functionality like this.

1 reply

October 15, 2011

Volker Volker
Robot Herder
5428 posts

You might want to get the underlying model with model() and search that with QAbstractItemModel::match().

If that does not help, you could iterate through the QAbstractItemModel::headerData() results.

 
  ‹‹ painting on qimage or qpixmap taking time in real time plotting      QTableWidget problem ››

You must log in to post a reply. Not a member yet? Register here!