Results 1 to 3 of 3

Thread: Create folder at specfic path on runtime

  1. #1
    Join Date
    Oct 2014
    Posts
    71
    Thanks
    13
    Qt products
    Qt5
    Platforms
    Windows

    Question Create folder at specfic path on runtime

    How to create a folder at specific path
    Eg:
    I want to create a folder at location : D:/Polyspace/Source.
    On above path my program should create a folder with some specific name

    I tried the below code but its not working

    Qt Code:
    1. QString path = "D:/Polyspace/Source";
    2. QDir dir(path);
    3. if (!dir.exists()){
    4. dir.mkdir("NewFolder");
    5. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Create folder at specfic path on runtime


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

    Default Re: Create folder at specfic path on runtime

    Please do not open several threads asking the same question. I posted a reply in your other thread.

Similar Threads

  1. Change plarform folder path to root folder path
    By Alundra in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2015, 22:53
  2. Replies: 1
    Last Post: 2nd November 2012, 09:07
  3. Full path and filename of a Qt Plugin at runtime
    By be-noix in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2011, 15:38
  4. Qt4: How to get the Common Application Data folder path?
    By Ankitha Varsha in forum Qt Programming
    Replies: 10
    Last Post: 21st October 2008, 12:14
  5. Path to the previous folder
    By Zergi in forum Newbie
    Replies: 2
    Last Post: 15th July 2008, 18:24

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