@jaivardhanf said in How to change QTableView data based on selection in QComboBox.:
So below is my code.
Something seems to have gone wrong with the code tags, making it hard to read and potentially missing code.
Qt::ItemFlags LineModel::flags(const QModelIndex& index) const
{
return Qt::ItemIsEditable | QAbstractTableModel::flags(index);
}
Adding the ItemIsEditable flag doesn't matter if the goal isn't to edit the item through the view.
This is how I connect the signal and slot
connect(ui->lineClass, &QComboBox::currentTextChanged, this, &GetOptionsClass::TextChanged);
Verify that the slot is called when it should be, and that the arguments are as expected.