QTreeView and item editing
I have a QTreeView with an editable QDirModel. How can I detect when user ends an item editing (rename)? (I need to update some stuff after that)
And another question - is there someway to catch the Delete key pressing on QTreeView (without a subclassing)?
Re: QTreeView and item editing
Quote:
I have a QTreeView with an editable QDirModel. How can I detect when user ends an item editing (rename)? (I need to update some stuff after that)
Am not sure about it,,, but I guess QItemDelegate::setModelData is the function for you :)
Quote:
And another question - is there someway to catch the Delete key pressing on QTreeView (without a subclassing)?
Yess,,, install a event filter on the QTreeView - Refer QObject::installEventFilter
Hope this helps :)
Re: QTreeView and item editing
Thank you! And about the QItemDelegate::setModelData - I've used a commitData signal from QItemDelegate.
Re: QTreeView and item editing
Ya, commitData was the signal, I remembered somewhat abt it but was not able to locate it :(