Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QPlatformDialogHelper, QFileDialogOptions, and setSideBarUrls



  • I am using private headers to build custom dialog for QtQuick. In order to get a file dialog that does what we want we had to go down this route. Anyway, I am trying to create custom Urls in the sidebar under Windows. I have tried this when creating the dialog, but it will not show custom urls:

    QPlatformDialogHelper m_dlgHelper;
    QFileDialogOptions m_options;
    ...
    QList<QUrl> urllist;
    // added various urls
    ...
    m_options->setSideBarUrls(urllist);
    m_dlgHelper->setOptions(m_options);
    m_dlgHelper->setFilter();
    

    The dialog works otherwise. I cannot get the side bar urls I add to show up.



  • It doesn't look like there is a way to do custom sidebars in the QML versions of FileDialog:
    https://doc.qt.io/qt-5/qml-qtquick-dialogs-filedialog.html
    https://doc.qt.io/qt-5/qml-qt-labs-platform-filedialog.html

    It is like sidebars have just been ignored in QML altogether.

    Is there a way to do a custom semi native looking dialog with QML? I think I need to reinvent the file dialogs we have.


Log in to reply