PDA

View Full Version : how to browse images in qt ??



NewLegend
10th March 2011, 02:12
Hello
how to browse images in qt ??
I used this program
http://doc.qt.nokia.com/4.7-snapshot/dialogs-findfiles-window-cpp.html

QString directory = QFileDialog::getExistingDirectory(this,
tr("Find Files"), QDir::currentPath());


But, does not display the image
I do not know why

Zlatomir
10th March 2011, 02:33
Read the example documentation (that is an example that comes with the Qt SDK), because the code you posted is for selection of the folders (directories) where to search for files, not for opening files with a filter for pictures, that can be done with QFileDialog::getOpenFileNames(...) (http://doc.qt.nokia.com/latest/qfiledialog.html#getOpenFileNames)

//if i didn't understand your problem right, please provide more details about your issue.

NewLegend
10th March 2011, 03:27
Thank you
I want to take the image from my computer, then display the image.

What better way to display the images in qt designer ??

wysota
10th March 2011, 22:16
Better than what?