Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QPlatformDialogHelper, QFileDialogOptions, and setSideBarUrls

QPlatformDialogHelper, QFileDialogOptions, and setSideBarUrls

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 328 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fcarneyF Offline
    fcarneyF Offline
    fcarney
    wrote on last edited by
    #1

    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.

    C++ is a perfectly valid school of magic.

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      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.

      C++ is a perfectly valid school of magic.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved