def set_item_user_text(item, text):
 item.setData(0, Qt.UserRole, to_qvariant(text))

def set_item_user_text ( item , text ) : item . setData ( 0 , Qt . UserRole , to_qvariant ( text ) )
set qtreewidgetitem user role string .