Results 1 to 4 of 4

Thread: How to filter executables in linux.

  1. #1
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default How to filter executables in linux.

    Hi All,
    How it is possible to filter the Executable files in linux to show in QFileDialog?

    Thank u all.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to filter executables in linux.


  3. #3
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to filter executables in linux.

    Quote Originally Posted by Lykurg View Post
    I did like

    Qt Code:
    1. QFileDialog fileDlg;
    2. fileDlg.setFilter(QDir::Executable);
    3. QString fileName = open.getOpenFileName(this, tr("Open Executables "), QDir::homePath());
    To copy to clipboard, switch view to plain text mode 

    But its not working. I'm using Ubuntu.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to filter executables in linux.

    First your pasted code is senseless since fileDlg and open are not the same. Second QFileDialog::getOpenFileName() is a static member function, so all settings you made before are not used. So use QFileDialog::exec() instead.

Similar Threads

  1. Replies: 3
    Last Post: 18th January 2010, 10:35
  2. Problem with executables
    By Dante in forum Qt Programming
    Replies: 4
    Last Post: 29th March 2009, 17:06
  3. [Q] how to build Qt executables only?
    By khopper in forum Installation and Deployment
    Replies: 4
    Last Post: 1st December 2008, 16:00
  4. Segmentation fault running any QT4 executables
    By jellis in forum Installation and Deployment
    Replies: 7
    Last Post: 19th May 2007, 16:35
  5. How to run my qt4 application programms(executables)
    By locus in forum Qt Programming
    Replies: 2
    Last Post: 28th March 2007, 17:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.