How can i create a pointer with QPIxmap so that it can read images from a folder after passing an index value to it?
Any help would be greatly acknowledged.
Printable View
How can i create a pointer with QPIxmap so that it can read images from a folder after passing an index value to it?
Any help would be greatly acknowledged.
Can u elaborate what index means ?Quote:
How can i create a pointer with QPIxmap so that it can read images from a folder after passing an index value to it?
Also go through the Qt Demos.. you will find something useful ( Image Viewer example)
I have to make an application so that on moving a slider it would pass an index value to graphicsview so that it can display the corresponding image file where images are stored in a directory.How can i make such a pointer that will be auto updated by changing its file location and setting address for pixmap?
You will have to code yourself..
First mainatin all the image files in the directory in a list..
Set the range of slider based on the size of list..
Now when the slider value changes, fetch the value of slider, fetch the filename with given index from the list, and display the image in graphics view or wherever u want.
Hope making image from filename is not a tough job.. ;)
could you please tell me how to fetch filename with given index from list? I m stuck at this point.
Have a look at QList & QVector - store your filenames there.
If you are using QStringList to store filenames, use list.at(index) .
Please give some time studying classes.
I'd be suprised if [] isn't overloaded too.