PDA

View Full Version : QFileDialog Issue



vishal.chauhan
14th March 2007, 13:39
Hi All,

I am using Qt 4.2.2 on my Intel Mac.
I m using the following code....

QString FileName= QFileDialog::getSaveFileName(this,"Creating Media Image to Save","MediaImage","");

In this I m giving the Default name MediaImage to save but the user can not change the Name from MediaImage to other Name.

what I want that it shows the name by default but If user want to change the Name then he/she should be able to change the name of the Saved file name.

If any body knows then plz help me.

Thanks.

fullmetalcoder
14th March 2007, 13:58
Either a typo in your post or wrong code... Qt docs will help you more than I could : http://doc.trolltech.com/4.2/qfiledialog.html#getSaveFileName

vishal.chauhan
15th March 2007, 04:30
Thanks for Reply.

I already go through the getSaveFileName and if i used the Example given below in the help..

QString FileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"/home/jana/untitled.png",tr("Images (*.png *.xpm *.jpg)"));

I can not change the name from untitled.png.