Trying to center an icon within a QTreeWidgetItem. The formatting set with setTextAlignment() only applies to text within the column. For example:
item = new QTreeWidgetItem(tree);
item->setIcon(0, QIcon(QPixMap(imageFile));
item->setTextAlignment(0, Qt::AlignHCenter | Qt::AlignVCenter);
tree->addTopLevelItem(item);
This will create a column with a left-aligned icon (and text center-aligned if there is any). Is there a way to center-align the icon with a custom stylesheet?