Display images in a Windows
-
I have a file. Txt contains about 100 lines in the following form:
/ home/clairsang/Bureau/TPE/GoogleImage/0001.jpg
/ home/clairsang/Bureau/TPE/GoogleImage/0078.jpg
/ home/clairsang/Bureau/TPE/GoogleImage/0148.jpg
....Now, I want to create a windows with one button, when pressed on this button pops up a new window, this window displays 100 images contained in the above file.
Thanks.
-
welcome to devnet
Probably one of the examples can guide you toward your target. One of those could be the "basic graphics example":http://qt-project.org/doc/qt-4.8/graphicsview-basicgraphicslayouts.html However, you may want to study other examples as well.
-
One hundred images in a grid? In a flipbook? Horizontally? Vertically?
Are the images full sized? Resized?
-
!http://nk0.upanh.com/b4.s27.d2/c29e04c8acd8185b8f0d16e433376849_43310820.capture.png(Show images)!
Actually, I only want to show up, like in the photo above is ok.
Thanks for your answer. -
I have found two examples of this, but difficult to apply.
http://qt-project.org/doc/qt-4.8/demos-declarative-flickr.html
http://qt-project.org/doc/qt-4.8/demos-declarative-photoviewer.html
-
You may also consider using QGraphicsView.
Create a set of QGraphicsPixmapItem from your resource images. Set proper size for them, put into layout (i.e. "QGraphicsGridLayout":http://qt-project.org/doc/qt-4.8/qgraphicsgridlayout.html) or align manually and you're done.