Hi, I have a base model, a table with two columns and a bunch of rows.
To display it in a QComboBox, I'm using a proxy model that merges the two columns in one. >From there on I thought it would be cool to a row on top of everything saying "<Select Stuff>". So I did that in the ProxyModel: int ServicesListProxyModel::rowCount(QModelIndex const &) const { return model()->rowCount() + 1; } // ... QVariant ServicesListProxyModel::data(QModelIndex const & index, int role) { if(index.row() == 0) return tr("Select a service"); QModelIndex sourceId = model()->index(index.row() - 1, ServicesListModel::Column_ID); QModelIndex sourceName = model()->index(index.row() - 1, QiServicesListModel::Column_Name); // return the normal line of text agregating id and name } It works nicely, however I get this in the console output: QAbstractItemModel::endInsertRows: Invalid index ( 79 , 0 ) in model QProxyModel(0xad8050) Am I missing something obvious here ? Thanks a bunch in advance :) Clément
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest