I am trying to display an image on a Push button using the icon property.

Here is the compiled ui file:

Qt Code:
  1. pushButton_3 = new QPushButton(tab);
  2. pushButton_3->setObjectName(QString::fromUtf8("pushButton_3"));
  3. pushButton_3->setGeometry(QRect(500, 30, 211, 131));
  4. QIcon icon2;
  5. icon2.addFile(QString::fromUtf8("resource/image.jpg"), QSize(), QIcon::Normal, QIcon::Off);
  6. pushButton_3->setIcon(icon2);
  7. pushButton_3->setIconSize(QSize(100, 100));
To copy to clipboard, switch view to plain text mode 

The image is displayed inside Qt creator, but the compiled executable does not have the image in the button.

I have also tried creating a resource file and including images to the resource file.

Some help would be great!