Results 1 to 13 of 13

Thread: QFileDialog filter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2
    Thanked 29 Times in 28 Posts

    Default Re: QFileDialog filter

    The Qt documentation says that QDir::Executable needs to be combined with QDir:: Dirs or QDir::Files.
    Read the docs about QFileDialog::setFilter(...)!

  2. #2
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Qt products
    Platforms
    Unix/X11 Windows
    Thanks
    20
    Thanked 5 Times in 5 Posts

    Question Re: QFileDialog filter

    Qt Code:
    1. open.setFilter(QDir::Files | QDir::Executable);
    To copy to clipboard, switch view to plain text mode 

    Still not work
    Have any suggestion ?

  3. #3
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Platforms
    MacOS X Unix/X11
    Thanks
    1
    Thanked 52 Times in 52 Posts

    Default Re: QFileDialog filter

    Does anything happen when setting the filter? Does any other filter work for you?
    It's nice to be important but it's more important to be nice.

  4. #4
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Qt products
    Platforms
    Unix/X11 Windows
    Thanks
    20
    Thanked 5 Times in 5 Posts

    Question Re: QFileDialog filter

    Nothing
    And I don't know why...

  5. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: QFileDialog filter

    How do I set filter for retrieving list of files of type *.png AND *.jpg (or many more pic formats)?
    Qt 5.3 Opensource & Creator 3.1.2

  6. #6
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2
    Thanked 29 Times in 28 Posts

    Default Re: QFileDialog filter

    Have a look at the "Detailed Description" of QFileDialog. There you will find an example for multiple filters.

Similar Threads

  1. QFileDialog - will be closed after selecting a file
    By skyperhh in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 16:49
  2. QFileDialog and file sequences
    By peterhillman in forum Qt Programming
    Replies: 5
    Last Post: 24th November 2007, 10:16
  3. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41
  4. QFileDialog Mac / PC
    By hey in forum Qt Programming
    Replies: 3
    Last Post: 26th April 2007, 18:23
  5. Replies: 9
    Last Post: 5th March 2006, 03:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.