Hello,

I'm trying to add a label as an image. So I've created a resource under Qt and added in the images, but when I try to run the code it only adds in the image if I give it the extact path and not the short version.

For example:

This works
Qt Code:
  1. void MainWindow::TestIOinputs()
  2. {
  3. QPixmap stat_GO ("C:/Qt/MyProject/images/stat_noGO.png");
  4. ui->label_3->setPixmap(stat_GO);
  5. }
To copy to clipboard, switch view to plain text mode 

This doesn't work
Qt Code:
  1. void MainWindow::TestIOinputs()
  2. {
  3. QPixmap stat_GO (":/images/stat_noGO.png");
  4. ui->label_3->setPixmap(stat_GO);
  5. }
To copy to clipboard, switch view to plain text mode 

The resource file is called images and I have added the images there. I can also see that the .pro file has the resources.qrc added in. Any ideas?