Hi iv looked at other questions and solutions for this but none seem to help for my specific problem.
Im simply trying to add a picture to my GraphicsView that i have added using Qt designer
.cpp
void test::populateScene()
{
QImage image(":/images/myFile.png");
QGraphicsPixmapItem item(QPixmap::fromImage(image));
QGraphicsScene *scene = new QGraphicsScene;
scene->addItem(&item);
ui->graphicsView->setScene(scene);
}
i have the necessaary includes but when i click run the program just puts up a not responding message straight away
i have no compiler errors just hit run and then then get test.exe is not responding
any ideas, this seems like it should be really simple but i cant work out why this isnt right (mainly due to no compiler errors to look through and find the cause of the crash)