After you create your QTreeWidgetItem you need to add it to a selectable QTreeWidget

Qt Code:
  1. mTreeWidget->setSelectionMode(QAbstractItemView::MultiSelection);
  2. ...
  3. mTreeWidget->addTopLevelItem(cities);
To copy to clipboard, switch view to plain text mode 

Whenever any item in the tree is selected the tree emits an itemClicked signal which you connect to like

Qt Code:
  1. QObject::connect(mTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(onClicked(QTreeWidgetItem*, int)));
  2.  
  3. onClicked(QTreeWidgetItem* item, int column)
  4. {
  5. //Do whatever you want to the item here
  6. }
To copy to clipboard, switch view to plain text mode 

You actually shouldn't need to set you objects checked state manually the tree will do that automatically