I want my tablewidget has these functionality:
1) one column can be editable, the rest not;
2) row select

I tried it out in this way:

Qt Code:
  1. tableWidget->horizontalHeader()->setClickable(false);
  2. tableWidget->horizontalHeader()->setStretchLastSection(true);
  3. tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);
  4. tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
To copy to clipboard, switch view to plain text mode 

tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers ) will forbiden all the edition. I couldn't find out the correct method for enable edition only for on column. The method of setFlags() to TableWidgetItem with Qt::ItemIsEditable will disable the edition. I am confused. Any one can help? Thanks.