PDA

View Full Version : QFileDialog Issue



vishal.chauhan
27th February 2007, 08:44
Hi All,

I m using Qt 4.2.2 on my Intel mac.
I m using QFileDialog::getExistingDirectory to get the dir to save a file.


QString s = QFileDialog::getExistingDirectory
(
this, tr("Open Directory"),QString::null,QFileDialog::ShowDirsOnly | FileDialog::DontResolveSymlinks
);
I have some Issue in this.

1. If I click the cancel button of the dialog it still taking the value of Dir.

2. When I take the value from this Dialog in a String I want that the memory used and reference used by this QFileDialog will be released.


If anyone knows then plz help me.


Thanks.

manivannan_1984
27th February 2007, 11:38
Check the string when u click the cancel button, it should be empty..

Also when the QFile dialog has been closed, it will automatically releases it memory.. no need to do anything..

Regards,
mani

vishal.chauhan
28th February 2007, 14:47
Check the string when u click the cancel button, it should be empty..

Also when the QFile dialog has been closed, it will automatically releases it memory.. no need to do anything..

Regards,
mani


Actually my first problem is solved but I m not sure it is releasing the memory or not.
Actually I m saving some data in file in mac using File System API but when I again open the QFileDialog my system crashes.


and it is giving Bad access on the line where QFileDialog is open.