As webclectic pointed out, you probably want to set the icon_item element:
ui->tableFeed->setItem(row, 0, icon_item);
... if it really compiled in this way, then I assume that it built an implicit QTableWidgetItem using one of the available constructors .
I'm not sure what will happen if the icon cannot be created from the specified png, but you can also check if the icon is loaded correctly and can be displayed correctly. For example, what icon.isNull() return? What happens if you put it in a shortcut?
Another option is to load the icon from the raster map, so you can make sure that it is really loaded properly:
QPixmap p; if (!p.load(yourFilename) || p.isNull()) { qDebug() << "Error!"; } QIcon icon = QIcon(p); // and if wanted: label->setPixmap(p)
source share