Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76292

Labs Platform FileDialog only respects folder property once

    XMLWordPrintable

Details

    Description

      Even a Binding doesn't work:

          Platform.FileDialog {
              id: openProjectDialog
              objectName: "openProjectDialog"
              nameFilters: ["All files (*)", "PNG files (*.png)", "BMP files (*.bmp)", "SLP files (*.slp)", "STP files (*.stp)"]
              defaultSuffix: projectManager.projectExtensionForType(Project.ImageType)
              onAccepted: loadProject(file)
              onFolderChanged: print(folder)
      
              Binding {
                  target: openProjectDialog
                  property: "folder"
                  value: project && project.loaded ? project.dirUrl : ""
              }
          }
      

      I accepted a fix that made folder actually do something:

      https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/250538

      but I wonder if we should go a step further and use the folder that was set every time the dialog is opened - while at the same time being careful to respect where the user navigated to? I'm not sure how it should work... we should see how QFileDialog works.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes