Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. File modes of QFileDialog
QtWS25 Last Chance

File modes of QFileDialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
qfiledialog
2 Posts 2 Posters 994 Views
  • 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.
  • S Offline
    S Offline
    ssmo3
    wrote on 16 Dec 2016, 18:55 last edited by
    #1

    Hello!
    I'm new to Qt, having made the decision to use PyQt to lay out the interface of a small Python application. But although I have a question about PyQt, I will submit that question directly to their mailing list. For you, the question regards the modes of QFileDialog.

    The basic gist of my application is to grab a selection of one or more files or directories and for each:

    • If the item is a file, all spaces in the filename will be converted to underscores.

    • It the item is a directory, all spaces in the directory name will be replaced by underscores. Then the algorithm will be performed recursively by walking the directory tree top-down.

    What I want to know is, do the AnyFile, ExistingFile, and ExistingFiles modes of QFileDialog::FileMode allow for selecting directories as well as files on Windows? on Mac? If the ExistingFiles mode allows for selecting directories, does it allow for selecting files and directories at the same time on Windows? on Mac?

    I have alternative structures for my application in mind; I just need to make sure I don't miss any capability that is not documented. Thank you!

    Stuart

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Dec 2016, 21:53 last edited by
      #2

      Hi and welcome to devnet,

      IIRC, you can select one or the other but not both at the same time.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      16 Dec 2016, 21:53

      • Login

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