Results 1 to 7 of 7

Thread: open a folder with Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    483
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanked 97 Times in 94 Posts

    Default Re: open a folder with Qt

    Have a look at the QDir class. It has a method that creates a path.

  2. The following user says thank you to yeye_olive for this useful post:

    Alex22 (8th January 2016)

  3. #2
    Join Date
    Nov 2015
    Posts
    128
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    70

    Default Re: open a folder with Qt

    @yeye_olive, Thanks
    I fund this:

    Qt Code:
    1. QDir("newfolder").exists();
    2.  
    3. //To create "newfolder"
    4. QDir().mkdir("newfolder");
    To copy to clipboard, switch view to plain text mode 

  4. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,335
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    317
    Thanked 871 Times in 858 Posts

    Default Re: open a folder with Qt

    I hope you understand that your "solution" only works if you want to examine or create something in your current working directory. The QDir() constructor with no arguments returns a QDir instance pointing to the current working directory.

  5. The following user says thank you to d_stranz for this useful post:

    Alex22 (9th January 2016)

  6. #4
    Join Date
    Nov 2015
    Posts
    128
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    70

    Default Re: open a folder with Qt

    Quote Originally Posted by d_stranz View Post
    I hope you understand that your "solution" only works if you want to examine or create something in your current working directory. The QDir() constructor with no arguments returns a QDir instance pointing to the current working directory.
    Thanks a lot. I know d_stranz

Similar Threads

  1. Replies: 1
    Last Post: 21st August 2013, 23:23
  2. Intercept windows open folder
    By nasiroudin in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2012, 19:49
  3. Files in the project folder won't open...
    By danoc93 in forum Newbie
    Replies: 2
    Last Post: 20th January 2012, 20:46
  4. Replies: 3
    Last Post: 26th September 2011, 14:14
  5. Multiplateform open folder in explorer
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 10th January 2011, 08:27

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.