QModelIndex current = ui->tableView->currentIndex(); qDebug()<<ui->tableView->model()->data(ui->tableView->model()->index(current.row(),0),0);
ui->tableView->model()->data(ui->tableView->model()->index(current.row(),0),0);
ui->comboBox->addItem((ui->tableView->model()->data(ui->tableView->model()->index(current.row(),0),0)));
D:\project qt new\untitled\untitled33\mainwindow.cpp:93: ошибка: no matching function for call to 'QComboBox::addItem(QVariant)'
void QComboBox::addItem(const QString & text, const QVariant & userData = QVariant())
C++ (Qt)QAbstractItemModel * model = ui->tableView->model(); int row = ui->tableView->currentIndex().row();int column = 0;const QModelIndex & index = model->index( row, column );const QString & text = model->data( index, Qt::DisplayRole ).toString();ui->comboBox->addItem( text );