I have just started using Qt and I've been trying to get a single button to display an icon but for some reason I can't get it to work. This is my code
QPushButton* button = new QPushButton();
button->setIcon(QIcon("icon.png"));
button->show();
I don't know what I'm missing here, the icon.png and the .cpp file are both in the same folder.. What am I doing wrong?