Results 1 to 12 of 12

Thread: QFileDialog does not always return path - (bug?)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    11
    Qt products
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3

    Default QFileDialog does not always return path - (bug?)

    hi,

    i just encountered a problem with QFileDialog. I use the static method "getExistingDirectory" to select a path, used in my software.
    If i open the filedialog and click "Choose" without really choosing a dir, the return value is an empty string.
    I would have been expected at least the path to the directory which has been showed, when opening the filedialog.
    What if a user is happy with the path suggested at opening the dialog and just clicks "Choose" - i just get an empty string and do not know what has been selected.
    I do not set a default path at opening the dialog yet. but doing so would not solve the problem.

    if i use the dialog to browse to a specific dir and select it - i get the path as return value. if i open the dialog again - the previously selected dir is shown. if i click "Choose" now, the return value is an empty string again.

    is this a bug? i do understand why "Cancel" returns an empty string, but "Choose" too?

    to clarify my problem:

    i am not able to investigate, if the user clicked "cancel" or if the user is satisfied with the path suggested at showing the filedialog and just clicked "choose"
    in both cases i just get an empty string.

    thnx, chris
    Last edited by wysota; 2nd October 2010 at 00:14.

Similar Threads

  1. Replies: 6
    Last Post: 22nd April 2010, 15:43
  2. Replies: 1
    Last Post: 19th March 2010, 13:59
  3. Replies: 8
    Last Post: 17th October 2009, 08:10
  4. QFileDialog disable Dir Path
    By user_mail07 in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 19:57
  5. The return of the king!
    By fullmetalcoder in forum Qt-based Software
    Replies: 56
    Last Post: 3rd September 2006, 01:38

Tags for this Thread

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.