2012-05-04 4 views

답변

3

당신이 다음

QDir().mkdir("MyFolder"); 


bool QDir::mkdir (const QString & dirName) const 
Creates a sub-directory called dirName. 

Returns true on success; otherwise returns false. 

See also rmdir(). 

같은 폴더를 만들 수 있습니다

QDir directory("gg/ggg./fff/ff/file"); 

같은 경로를 설정할 수는 http://doc.qt.io/qt-5/qdir.html#mkdir

bool QDir::mkpath (const QString & dirPath) const 
Creates the directory path dirPath. 

The function will create all parent directories necessary to create the directory. 

Returns true if successful; otherwise returns false. 

를 참조 참조

http://doc.qt.io/qt-5/qfile.html#open를 참조

관련 문제