Reputation: 119
Problem show in the link below: http://postimg.org/image/sp9mm85qb/
I try to add this image in code
QIcon iconmain("qrc:/img/main.png");
ui->tabWidget->tabBar()->setTabIcon(1,iconmain);
Tried to add image from resourse file from disk. But it still invisible.
Upvotes: 0
Views: 340
Reputation: 27611
I assume the image is in the resource file with the prefix img, so you would access it without the qrc text prefix: -
QIcon iconmain(":/img/main.png");
Upvotes: 1