Results 1 to 5 of 5

Thread: getExistingDirectory doesn not expand directory tree

  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default getExistingDirectory doesn not expand directory tree

    Good evening,
    I'm writing a code where I call the getExistingDirectory and the directory tree doesn't expand.
    This is the code:

    Qt Code:
    1. void MainWindow::on_sourceDirBrowseButton_clicked()
    2. {
    3. QString path = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
    4. m_application->userDataDir().path()); // This doesn't expand
    5. if (!path.isEmpty())
    6. {
    7. m_application->setSourceDirPaths(QStringList(path));
    8. }
    9. }
    To copy to clipboard, switch view to plain text mode 

    I'm working under Windows XP.

    Any help is appreciated.

    Regards,
    Franco
    Franco Amato

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: getExistingDirectory doesn not expand directory tree

    What exactly does m_application->userDataDir().path() return?

  3. #3
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: getExistingDirectory doesn not expand directory tree

    Hi Chris,
    it returns "C:/Documents and Settings/Usuario/Mis documentos/CertiBoxUserData"
    and the dir exists
    Franco Amato

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: getExistingDirectory doesn not expand directory tree

    When you say "doesn't expand" what do you mean? Are there subdirectories of ""C:/Documents and Settings/Usuario/Mis documentos/CertiBoxUserData" that you cannot access?

  5. #5
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: getExistingDirectory doesn not expand directory tree

    yes there are subdirectories and when I execute the dialog I have to click on the + symbol to see them.
    I would open the dialog and see them immediately. I hope you can understand me
    Franco Amato

Similar Threads

  1. How to list the ftp directory in tree widget?
    By Gokulnathvc in forum Newbie
    Replies: 4
    Last Post: 18th October 2012, 05:08
  2. Replies: 1
    Last Post: 26th December 2008, 12:59
  3. nsis script question: directory tree
    By vonCZ in forum General Programming
    Replies: 3
    Last Post: 28th November 2008, 00:22
  4. Replies: 1
    Last Post: 20th July 2008, 19:47
  5. Replies: 11
    Last Post: 2nd August 2007, 20: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.