kaushal_gaurav
8th August 2008, 06:33
hi,
How can i display selected columns from a Model into my QTableView widget.
Say my model has 5 cloumns and i want o display two in a QTableView widget and
populate any other combo box widget with data from the third colunm of the Model.
int MyModel::columnCount(const QModelIndex& p) const
{
if ( p.isValid() || !sourceModel() )
return 0;
return 3;
}
Then three columns are shown in my QTableView widget but i want only two and data for the third to be put in a comboBox.
help!!!!
Regards,
GK
How can i display selected columns from a Model into my QTableView widget.
Say my model has 5 cloumns and i want o display two in a QTableView widget and
populate any other combo box widget with data from the third colunm of the Model.
int MyModel::columnCount(const QModelIndex& p) const
{
if ( p.isValid() || !sourceModel() )
return 0;
return 3;
}
Then three columns are shown in my QTableView widget but i want only two and data for the third to be put in a comboBox.
help!!!!
Regards,
GK