PDA

View Full Version : How I add rename in QTreeWidgetItem?



rajesh
29th March 2007, 07:42
I have added "Rename" in context menu in QTreeWidget. but how to show rename effect in QTreeWidgetItem?

wysota
29th March 2007, 08:05
Make the item editable by setting an appropriate flag on it and when you want to rename it, call edit().

rajesh
29th March 2007, 08:59
wysota,
which signal it will generate after edit() i.e after rename completion?

patrik08
29th March 2007, 09:28
wysota,
which signal it will generate after edit() i.e after rename completion?



void QTreeWidget::itemChanged ( QTreeWidgetItem * item, int column ) [signal]
This signal is emitted when the contents of the column in the specified item changes.

rajesh
30th March 2007, 10:42
QTreeWidget::itemChanged ( QTreeWidgetItem * item, int column ) is not working for me.

wysota
30th March 2007, 12:10
In what way is it not working for you?