Using QDialog as a delegate is problematic because QDialog::done(int) calls hide() before setResult(), therefore the result cannot be inspected by the Delegate's setModelData() method.
QDialog::done(int) should invoke setResult() before calling hide().
A possible usecase:
A table view showing properties of a polygon, e.g. with the columns "Name", "Position", "Color" etc. The "Position" column shows something like "5 point polygon around position (3,4)". Editing this cell would open a more elaborate QDialog that shows all five polygon vertex coordinates (as such an edit dialog would surely not fit into the cell rectangle).
My workaround is to manually call QDialog::setResult() before calling QDialog::accept() or QDialog::reject() in my class derived from QDialog. But I see no reason why QDialog should not call setResult() before hide().