PDA

View Full Version : how to show previewof the selected images in the native dialog



vishal
4th February 2008, 07:53
hello
i am trying to develop an application in which a file dialog opens on a click of a push button.now the problem is when i select the images shown in file dialog ,i want to show the preview of that image before selecting the image.

aamer4yu
4th February 2008, 11:57
You can use a QLabel to show the image. Use QLabel::setPixmap to set the image.
pseudo code is :

scaledImage = image.scaled(); // small size of original image
label.setPixmap(scaledImage);


Hope this helps

VlJE
4th February 2008, 12:00
1. You can write your own FileDialog using QDialog and QDir.
(2. Compromiss: If you programm for windows using QString QFileDialog::getOpenFileName, the result MS File Dialog has a thumbnails view.
3. Compromiss: I can try to subclass and to change QFileDialog)