Question

All examples in Qt show that one should use delegate classes to provide editors that reside within QTreeView (QListView, etc). I want to have a separate non-modal dialog to edit item's attributes. Should I use delegate classes to do so?

That is, no editing or special behavior is required within QTreeView.

Was it helpful?

Solution

You certainly could create your dialog as a delegate, but I don't think I'd go that far. Just make sure that your separate dialog is updated appropriately when the model's data changes, or the view changes selection. (And tracking the selection changes could be made quite a bit easier, in my opinion.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top