QFileDialog's getOpenFileName crash in 10.5.x Leopard
Hi
When i m using QFileDialog::DontUseNativeDialog flags for Non-Native Dialog while getOpenFileName and getSaveFileName in 10.5.x Leopard..
On initiating dialog it repeatedly crashes.
I m using like this while Translation purpose in Japanese lang.
QString str = QFileDialog::getOpenFileName(this,tr("OPen"),QDir: :currentPath(),NULL,NULL,QFileDialog::DontUseNativ eDialog);
I m not figure out of this crash in 10.5.x
Thanks
Santosh
Re: QFileDialog's getOpenFileName crash in 10.5.x Leopard
I'll take a guess assuming that this line is the actual cause: that's all that is possible without any description of the nature of the crash.
Code:
this, // parent, possible cause of crash if invalid or becomes invalid after dialog opens
tr("OPen"), // caption
QDir::currentPath(),
// directory NULL, // filter string (type should be const QString &)
NULL, // selected filter, null is default
);
From the QFileDialog::getOpenFileName() docs:
Quote:
Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings.
A null pointer is not an empty string so start there. Doesn't crash my Linux or Windows boxes though.
You could help your cause by using your debugger to see where it dies and reporting more information.