I found a better solution: leave the QTreeWidgetItem objects un-editable, and call the following convenience functions provided by QTreeWidget:
tree_widget->openPersistentEditor(item,col);
...
tree_widget->closePersistentEditor(item,col);
tree_widget->openPersistentEditor(item,col);
...
tree_widget->closePersistentEditor(item,col);
To copy to clipboard, switch view to plain text mode
The item and column are provided by the signals I capture with slots in my parent form. I make the calls only for the target column, thus achieving the column-specificity I was after. For my app I am using signal
QTreeWidget::itemDoubleClicked(QTreeWidgetItem*,int)
To copy to clipboard, switch view to plain text mode
to trigger editing.
So no fooling with QTreeWidgetItem flags, just starting/stopping the editor explicitly, and using the persistent one.
McKee
Bookmarks