PDA

View Full Version : Open FileDialog showing Back of the Widget in Mac



shyam prasad
19th April 2007, 07:02
Hi

I am using Mac 10.4

I want open an Image File from FileDialog using QFileDialog . But FileDialog is showing backside of the widget in Mac OS .
If i want select a file i should have to move the widget aside .

Code snippet :

QString selectFile = QFileDialog::getOpenFileName( 0x00 , tr("Open File") ,
QDir::currentPath() , tr("Images (*.png *.jpeg *.jpg *.bmp);; bmp (*.bmp);;jpg (*.jpeg *.jpg);;png (*.png)"));


Please can anybody help me to get FileDialog to be on top of the widget in Mac .

Thnx in advance .

marcel
19th April 2007, 07:33
Give the widget from where you start the dialog as a parent to the file dlg ( the first parameter ).
Should be:


QString selectFile = QFileDialog::getOpenFileName( this , tr("Open File") ,
QDir::currentPath() , tr("Images (*.png *.jpeg *.jpg *.bmp);; bmp (*.bmp);;jpg (*.jpeg *.jpg);;png (*.png)"));



Regards