QFileDialog::DontUseNativeDialog is not working

点点圈 提交于 2019-11-29 04:17:56

The native dialogs don't support the full array of features exposed by the QFileDialog class. That's why they are only available through the static short-cut functions called getOpenFileName(), getSaveFileName() etc'. If you're using these functions and still don't want to see the native dialog, you use the DontUseNativeDialog flag.

Are you sure that such a child is created? Because if so, I would have assumed that you could do something like

QString path = QFileDialog::getExistingDirectory(this, ...);

QFileDialog *filedialog = this->findChild<QFileDialog*>();
if (filedialog) {
    filedialog->deleteLater();
}

But I tried it creating the dialog with this as the parent and calling findChild in this object as well as creating the dialog using 0 as the parent and calling findChild in the main window; both to no avail.

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