Results 1 to 4 of 4

Thread: How to set the fileMode in QFileDialog?

  1. #1
    Join Date
    Mar 2006
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to set the fileMode in QFileDialog?

    I wish to only display the executable file in QFileDialog.Which parameter should be set in setFileMode().

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to set the fileMode in QFileDialog?

    for Win use void QFileDialog::setFilters ( const QStringList & filters )
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Mar 2006
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set the fileMode in QFileDialog?

    --------------------------------------------------------------------------------

    I wish to only display the executable file(for linux)

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to set the fileMode in QFileDialog?

    I'm afraid this is not possible with the existent QFileDialog.

    What you could do, though, is to construct a custom dialog showing a QDirModel in a QTreeView. Then you just apply QDir::Executable filter for the dir model.

Similar Threads

  1. Check for invalid file name in QFileDialog
    By darren in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2008, 14:43
  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. copy file/s from QFileDialog
    By raphaelf in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 14:26

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.