Here is an example you can run using the itemviews example. The QTreeWidget is in the lower rightmost section. To adapt this script for your own application, use the "picker" eyedropper to find out the object's symbolic name in your application and replace the name with it in your own script.
We would like to use Google Analytics to get a better understanding of how
you use the website.
By agreeing to this, your usage data will be stored in the USA and processed
by Google LLC. Both Google as well as federal US agencies can access this data
and combine it with any other data about you, such as your search history,
personal accounts or any other data known to Google.