Re: Cancel last user ever
you have two possibilities here:
1) prevent renaming:
Qt4: QListWidgetItem::setFlags() Q3ListViewItem::setRenameEnabled()
2) allow the user to do something, and then say "no you don't" afterwards...
I don't like that approach :)
Then, you could integrate the model with QUndoStack (interesting to do, but overkill for you).
HTH
Re: Cancel last user ever
Quote:
Originally Posted by
caduel
But user should be able to rename tree branches.
Quote:
Originally Posted by
caduel
2) allow the user to do something, and then say "no you don't" afterwards...
I don't like that approach :)
itemRenamed() signal passes renamed item, so I can only say "that was wrong, please turn it back".:D
Any way, is it possible to attach a validator to rename field? I assume, rename field is QLineEdit object.
Quote:
Originally Posted by
caduel
Then, you could integrate the model with QUndoStack (interesting to do, but overkill for you).
:eek: