QT中的model和tableview都是采用index索引 index含有两个成员变量一个是row 一个是column 对应该索引的行号、列号
model提供数据 view提供视图 view用来显示model的数据 必须将model绑定到某个view中才能显示
ui->tableView->setModel(model);
ui->tableView->currentIndex();//获取选中单元格的index ui->tableView->currentIndex().column();//当前选中单元格的列号 ui->tableView->currentIndex().row();//当前选中单元格行号 ui->tableView->currentIndex().data();//当前选中单元格内的数据 model->setData(ui->tableView->currentIndex(),tr("123