Hello,

I have an application in which I need to save files into a directory. First I have a QDialog in which I fill in some information through combo-boxes and Line edits and when hitting the OK button I want to create a directory with a specified name in the home directory.

So if I set the name to "myDirectory" I want to be able to see (in Windows explorer for example) a folder created with the name "myDirectory" to later save files into that folder. The whole path would be C:/Users/home/myDirectory

I tried doing something like this:


Qt Code:
  1. void myDialog::createDirectory()
  2. {
  3. QString filePath = QDir::homePath() + "/" + m_Name;
  4.  
  5. QDir dir;
  6. dir.mkdir(m_Name);
  7. }
To copy to clipboard, switch view to plain text mode 

What am I missing to make this work??

Thank you.