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

FileDialog qml component doesn't recognize updates to folder property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.4.1, 5.12.0
    • QPA
    • None
    • OSX Version 10.10.3 (14D136)
      Qt 5.4.1
    • macOS

    Description

      The folder property of FileDialog doesn't work correctly under OSX under several situations.

      Steps to Reproduce:
      1. Create a FileDialog component, for example:

      FileDialog {
              id: importPlanDialog
              title: "Import Files"
              modality: Qt.WindowModal
              selectExisting: true
              selectFolder: false
              selectMultiple: false
      
              // this doesn't work on OSX.
              folder: "file:///Users/"
      
              onAccepted: console.log(folder)
      }
      

      elsewhere, call open() on the dialog. Choose any file and accept, then open the dialog again.

      Expected Result:

      • Platform native dialog should set the current directory to URL set in folder.

      Actual Result:

      • On the initial open() call the dialog will point and some unknown platform specific last opened location. It may be related to a setting in the app plist file, or it may be system wide. What ever it is, it will not be the URL set before the open() call, as stated in the documentation.
      • On the second open() call the dialog will point to the users Document directory, again ignoring the value of the folder property.

      It appears that on OSX the initial starting directory folder property is ignored on input, and is only updated on output.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            mikest Mike Estee
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes