WetCode
11th December 2013, 15:01
I have been trying to get a image to show in a GrapichsView.
But after alot of trail and error I have not got it to work.
Would anyone be so kind to point me in the right direction?
QGraphicsScene scene;
ui->graphics_ImgLib->setScene(&scene);
QPixmap image;
image.load(":/IMG/IMG/logo.png");
scene.addPixmap(image);
QGraphicsPixmapItem pixMapItem;
pixMapItem.setPixmap(image);
scene.addItem(&pixMapItem);
ui->graphics_ImgLib->show();
Thanks for any help.
Cheers
WetCode
But after alot of trail and error I have not got it to work.
Would anyone be so kind to point me in the right direction?
QGraphicsScene scene;
ui->graphics_ImgLib->setScene(&scene);
QPixmap image;
image.load(":/IMG/IMG/logo.png");
scene.addPixmap(image);
QGraphicsPixmapItem pixMapItem;
pixMapItem.setPixmap(image);
scene.addItem(&pixMapItem);
ui->graphics_ImgLib->show();
Thanks for any help.
Cheers
WetCode