Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.5.3
-
None
-
All
-
8b1d9d308b1f31e1b9c817e0d91e14baa3b76d6b
Description
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().
Attachments
Issue Links
- duplicates
-
QTBUG-6018 QDialog as a delegate woes
-
- Closed
-
- is duplicated by
-
QTBUG-14430 CLONE - QDialog as a delegate woes
-
- Closed
-