PDA

View Full Version : QT 4..8.4 Image import into QListWidget in a QT Widget



Venkatesh Padmanabhan
8th August 2013, 13:04
Hi all,

I am creating a image registration application using QT 4.8.4 in Mac OS X Mountain Lion. It would be great to have your guidance, how to import datas using a QPushButton and select the necessary .jpeg files and display it in a QListView as icons which is one among many components in a QWidget which i created using QT Creator. ( Both QPushButton, and QListView are in same QWidget )
Attached the snapshot of my application
9394.

I am beginner in qt would love to have your guidances.

ChrisW67
8th August 2013, 22:45
Write out in simple steps in English (or your native tongue) how you might do this. Then try to convert each step to code. For example:
Start when user presses button -> connect a slot to the clicked() signal
ask user to locate an image -> open a file dialog
load image into memory
scale image to thumbnail size
put image into view
etc.

Venkatesh Padmanabhan
11th August 2013, 13:14
Hi Chris,

Thank you so much for your response. It would be great help if you could guide me with a sample code for implementing it, it would be great help for me and other beginners to get an essence of QT Implementation. Looking forward to your guidance.

regards,
Venkatesh Padmanabhan

Added after 24 minutes:

I have used QPushButton to open a dialog to choose the folder but, the problem comes when trying to select the folder and import it into qlistview in icon mode. I don't know how to implement it and i could find a valid tutorial for it too. Awaiting your valuable guidance.