You can affect the position of the icon in relation to the text via the style options.
If the QTableWidgetItem is constructed without any text (via the constructor that does not accept a text argument), then the Qt::DisplayRole data item is not set and the text will not be displayed nor will it affect the icons display rectangle.
I was able to affect the position of the QTableWidgetItem s icon by subclassing the QTableWidget, overriding the viewOptions method and setting the decorationAlignment field of the view options, like this:
QStyleOptionViewItem MyTableWidget::viewOptions() const
{
QStyleOptionViewItem option = QTableWidget::viewOptions();
option.decorationAlignment = Qt::AlignHCenter | Qt::AlignCenter;
option.decorationPosition = QStyleOptionViewItem::Top;
...
return option;
}