From a previous post, I was able to align my Model with the View sucessfully so that colors of leaves in a QTreeWidget can be changed.

I cannot seem to figure out how to use the QTreeWidgetItem to traverse all of the tree's childless leaves. I wish to change the color of these leaves based on a flag setting. Any suggestions on how to use the iterator or another method?