Don't parent dialogs using WId
This causes glitches in the parent dialog, as winId causes problems when called on non-toplevel widgets, as done here.
Calling window()->winId() would also have fixed this, but using the QWidget-based parenting API seems more robust.