QTableViewは通常、現在フォーカスがある列を検索します。検索したい列のセルをクリックして、入力を開始するだけです。
[編集:]あなたのコメントについて
:また、セルを選択します
QTableView* tableView = /* whatever */;
tableView->setCurrentIndex(const QModelIndex& index)
これを使用して、アクティブセルに任意のセルを設定することができます。あなたはそれをしたくない場合は、あなたがスロット現在に接続している場合は
QModelIndex index = /* whatever */;
tableView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
行うことができます[行|コラム】変更またはテーブルビューのselectionModelの()の信号をselectionChangedは、次の操作を実行したいかもしれません、あなたのコードに依存:
QTableView* tableView = /* whatever */;
QModelIndex index = /* current row, whatever column you want to search in */;
QItemSelectionModel* selectionModel = tableView->selectionModel();
// probably check for a NULL pointer? - not really sure if this is possible
bool signalsWereBlocked = selectionModel->blockSignals(true);
selectionModel->setCurrentIndex(index);
selectionModel->blockSignals(signalsWereBlocked);
非常に有益な情報ありがとうございます – Luca