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. Select multiple files in QFileDialog
Forum Updated to NodeBB v4.3 + New Features

Select multiple files in QFileDialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 976 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.
  • D Offline
    D Offline
    drmhkelley
    wrote on last edited by
    #1

    Haven't found discussion of this specific issue.

    I use QFileDialog (most or next-most recent version) to select multiple files for action. Is is possible to create the dialog with multiple files pre-selected? It seems that selectFile(name) only sets the selected filename in the edit field, but does not "check the box" in the list of file names. Hence, for multiple calls to selectFile only the last one seems to have any effect.

    Is there another function to call that "checks the box" for multiple files?

    Thanks

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      it doesn't seem like there is an option for pre-selecting a list of files. I think the logic being that there is not a strong use case for such a feature. Also, the directory is scanned every time the dialog is realized, so there is the possibility of the pre-selected list being at least partially invalid. You can always make your own custom file selection dialog and add the feature if it is important.

      1 Reply Last reply
      1

      • Login

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