How to make QFileDialog a child of QQuickView (centered over its window)

  • Hello.

    I use Qt 5.2 and Qt Quick 2. The only window in my application is a QQuickView which is a subclass of QWindow, not of QWidget, so if I want to use in my app a QFileDialog (to give the user the option to save a file) I don't know how to set its parent to be the QQuickView. I know it would work without setting its parent, but if I set its parent, the dialog is centered over its parent window, and this is what I want. Otherwise this would not be a huge problem on its own, but on my system (Ubuntu 13.10) the QFileDialog sometimes appears under the QQuickView window and the only thing the user sees is a "flashing" taskbar item, and he also sees that the QQuickView does not react to mouse clicks (QFileDialog is modal).

    Thank you.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.