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. QFileDialog does not filter filenames?
Forum Updated to NodeBB v4.3 + New Features

QFileDialog does not filter filenames?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.7k 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.
  • O Offline
    O Offline
    OlafMeding
    wrote on last edited by
    #1

    Is there a reason why the QFileDialog does not filter file names?

    For example typing *.txt where the file name goes followed by the pressing the return key displays only files with a .txt extension (for example readme.txt, but not readme.doc).

    Many Windows open file type dialogs (for example notepad) allow the user to enter a filter text but this does not seem to work with the QFileDialog.

    I use Qt 4.8.6, PyQt 4.10.4 under MS Windows 7.

    And thanks for your help
    Olaf

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      See "the docs":http://qt-project.org/doc/qt-4.8/qfiledialog.html#setNameFilter.

      (Z(:^

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OlafMeding
        wrote on last edited by
        #3

        This is not what I meant. Your link require the filter to be known before the file dialog is displayed. Perhaps filter is not the correct term for this. I am talking about the user typing text into the file name field while the file dialog is displayed.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Yes, I was afraid you are going to say that ;-) I think the only option in that case is to use the native dialog.

          (Z(:^

          1 Reply Last reply
          0
          • O Offline
            O Offline
            OlafMeding
            wrote on last edited by
            #5

            Any way to request this feature, but how ... where ... digia?

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              If you are a commercial customer, then yes, please ask Digia.

              In general, it is enough to file a feature request on Jira. Please follow the link "here":https://bugreports.qt-project.org/secure/Dashboard.jspa.

              (Z(:^

              1 Reply Last reply
              0

              • Login

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