The problem is the line:
newItem->setData(0, 1, QVariant(leftPath + QDir::separator() + subDir));
The second argument is the item data role, which you specify to 1 (Qt::DecorationRole). The Qt::DecorationRole should be used for data that is rendered as a decoration in the form of an icon, i.e., this line will cause the the icon you specified before to be replaced with a QVariant
object.
Remove that line or change the item data role to something else.