Set the header text of a QTreeView header
It may be done in your model class that probably inherits QStandardItemModel.
Typically, you would call:
QStandardItemModel::setHorizontalHeaderLabels ( const QStringList & labels )
for text only, or
QStandardItemModel::setHorizontalHeaderItem ( int column, QStandardItem * item )
if more customization is needed in the header items.
Ah... anyone getting frustrated with this with PyQt5 might like to try this:
self.ui.treeView.setHeaderHidden( False )