pqFileDialog: make context menu items work on macOS

Fixes #20981 by setting a parent on the QMenu that is the context menu
as suggested in the Qt issue
https://bugreports.qt.io/browse/QTBUG-97559.
25 jobs for !5506 with 20981-mac-file-dialog-context-menu
latest merge request