Solved Setting different text when user starts editing QTreeWidgetItem
I have a tree which has item named like "abc (id=10, type=xyz)" Tree node is editable. I want user to allow only rename but not modify id and type part. So when user enters in edit mode user should see only "abc" which is editable.
Any suggestion how to do it.
Ratzz last edited by Ratzz
You can get the
indexand show only required part of
QString(may be using split) . When editing is completed just set back the newname and previous text (--+ (id=10, type=xyz)).
But I prefer
One way I know is using QItemDelegate just want to check any other simple way
@Ratzz Yes this is what I want to do but where should I do as I am not aware of any signal which is emitted just before opening editor
Ratzz last edited by