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

QFileDialog::selectedFiles() do not support tilde (~) in Linux.

    XMLWordPrintable

    Details

      Description

      If you use QFileDialog::getSaveFileName() then you can use ~ to define your home directory (e.g. ~/myNewFile).

      If I call the getSaveFileName() function with DontUseNativeDialog flag then it do not understand ~. If using the DontUseNativeDialog flag then it launches QFileDialog by using exec() and gets the filename by using dialog.selectedFiles().value(0) function.

      I'm using GTK+ style.

      Check the attached example application.

        Attachments

        1. TildeInPath.tar.gz
          0.9 kB
          Qt Support
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            miknuut Mikko Knuutila (Inactive)
            Reporter:
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes