Right now I have tried this (small snippet below) where I get a reduced image of a given image. I need idea on how to make the UI (the thumbnail viewer being just part of the whole UI) which I have mentioned before. Not code, I need ideas or what particular classes to use and why ? Any help ?
QgraphicsView view(&scene);
QImage img2
(img1.
scaled(200,
150, Qt
::IgnoreAspectRatio, Qt
::SmoothTransformation));
view.show()
QGraphicsScene scene;
QgraphicsView view(&scene);
QImage img1("1.png");
QImage img2(img1.scaled(200, 150, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
QGraphicsPixmapItem item = scene.addPixmap(QPixmap::fromImage(img2));
view.show()
To copy to clipboard, switch view to plain text mode
Added after 10 minutes:
One more thing I tried is using QLabel and adding images to a QHBoxLayout. but the thing is I need to make that thumbnail generation automatic from my content file, how is that possible.. ideas are fine..
My content part is a QGraphicsView and my left sidebar is a QFrame. So what help will it be if I change my sidebar to QGraphicsView or will QFrame is fine enough ?
Bookmarks