Results 1 to 3 of 3

Thread: To filter QFiledialog with the directory selected.

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default To filter QFiledialog with the directory selected.

    Hi

    I am working on Qt4.6 on mac os, Is it possible that If i open QFileDialog and selects the existing directory

    Qt Code:
    1. QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
    2. "/home",
    3. QFileDialog::ShowDirsOnly
    4. | QFileDialog::DontResolveSymlinks);
    To copy to clipboard, switch view to plain text mode 

    Then the selected dir, should not be shown in the QFiledialog if i open it again.
    Always Believe in Urself
    Merry

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,713
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: To filter QFiledialog with the directory selected.

    Can you give an example of what you mean?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: To filter QFiledialog with the directory selected.

    For Example, If I Open QFileDialog on click of QPushButton(BrowseButton1) and Select dirpath "/Volumes/MacHD", and if i click on another QPushButton(BrowseButton2) and open again QFileDialog then dir that is selected using BrowseButton1 that is(MacHD) should not appear in QFileDialog that is open using BrowseButton2, i want to filter selected dir name.
    Always Believe in Urself
    Merry

Similar Threads

  1. QFiledialog directory of selected file
    By seifhatem in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2011, 20:05
  2. Replies: 2
    Last Post: 4th November 2010, 21:12
  3. QFileDialog Filter Selector
    By SixDegrees in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2010, 01:00
  4. QFileDialog filter
    By wirasto in forum Newbie
    Replies: 12
    Last Post: 20th January 2010, 12:40
  5. Determining selected filter on getSaveFileName
    By Vash5556 in forum Qt Programming
    Replies: 4
    Last Post: 23rd June 2009, 19:21

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.