View Full Version : folder creation using the dialog box .

14th June 2012, 12:04
How can i ask one user to create a folder through one dialog box in qt .

So that whatever the name the user has given in the dialog box ( in a specific location,

for eg. c:/user/...) the folder will be created in that location and if the folder is

alreday present with the specific name in that location then replacement shall be done

14th June 2012, 13:05
Not sure what you want... QInputDialog::getText() maybe? Or QFileDialog::getSaveFileName()?

14th June 2012, 15:02
here the user action is to create one folder . There is one button in my project , so when the user click that button at that time one dialog box should open where the user may allow to give the folder name , through that dialog box the user allow to select the location , like whether he wants to create the folder in desktop or c drive or d drive . if the folder is already present in that specific location then it will ask for replacement to the user , if the user press yes then it will replace that folder or else the folder is not getting replaced

14th June 2012, 15:11
Then QFileDialog is something for you.

14th June 2012, 15:17
i got it .QFiledialog::getexistingdirectory ()is the right function for it .....i was confused , since its appearance is different in win 7 and XP .Thats why i was unble to mark the newfolder button present in that dialog .