Adding QFileDialog as a widget inside another QDialog

一笑奈何 提交于 2019-12-02 09:26:32

You need to turn off the Qt.Dialog flag in the file dialog's windowFlags...

file_dialog.setWindowFlags(file_dialog.windowFlags() & ~Qt.Dialog)

Otherwise the QFileDialog will always be created as a top level window. Works for me anyway.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!