Results 1 to 2 of 2

Thread: how to create folder in root directory using QT

  1. #1
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to create folder in root directory using QT

    Am using QT with Linux
    i can able to create folder in home directory .but i dont knw how to create folder in root directory in Linux using QT
    can any one give me suggestion for this
    Thanks in Advance

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: how to create folder in root directory using QT

    Only the root user can write to the root directory ("/") and this is not a Qt limitation at all. There are many ways to get around this, all of which are bad ideas for your Qt application to adopt.

    IMHO, rather than write data to a new directory based off the root, you should use the standard locations that each OS identifies are where your application should write transient or permanent files...

    Take a look at the QStandardPaths class and use a platform independent method of determining where your app should place its temporary or permanent files.

  3. The following user says thank you to jefftee for this useful post:

    iswaryasenthilkumar (25th February 2015)

Similar Threads

  1. how to run qt program in root directory(linux)
    By iswaryasenthilkumar in forum Newbie
    Replies: 2
    Last Post: 8th January 2015, 15:54
  2. How to create root node inQDirModel
    By deepak in forum Qt Programming
    Replies: 1
    Last Post: 29th August 2012, 08:03
  3. Replies: 1
    Last Post: 20th May 2012, 16:53
  4. Find the Qt root directory
    By sajis997 in forum Newbie
    Replies: 1
    Last Post: 15th July 2011, 23:52
  5. Replies: 1
    Last Post: 7th June 2011, 18:22

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.