Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDir::mkpath() and mkdir() keep failing to create folder
Forum Updated to NodeBB v4.3 + New Features

QDir::mkpath() and mkdir() keep failing to create folder

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WhatIf
    wrote on last edited by
    #1
    This post is deleted!
    K 1 Reply Last reply
    0
    • W WhatIf

      This post is deleted!

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @WhatIf

      Probably you need check out what and where you trying to create the new folder. E.g. with:

      qDebug() << "homeLocation            " << homeLocation;
      qDebug() << "location                       " << location;
      qDebug() << "pathToPhotosFolder " << pathToPhotosFolder; 
      

      Are you on windows?
      You are using a backslash which is typically used for windows. In general on any operation you may use with Qt a single forward slash as separator.

      My guess your problem is solved with:

       QString pathToPhotosFolder = homeLocation+"/photos"
      

      Otherwise you are simply extending the homeLocation's name whatever it is.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved