I have a TreeView class with QTreeWidgetItem's set as check boxes with the following code:

Qt Code:
  1. QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
  2. cities->setText(0, tr("Places"));
  3. cities->setCheckState(0, Qt::Checked);
To copy to clipboard, switch view to plain text mode 

I try to send a signal with the following code:

Qt Code:
  1. connect(cities, SIGNAL(itemClicked(QTreeWidgetItem *,int)), this, setChecked);
To copy to clipboard, switch view to plain text mode 

When I compile the code, the following errors come up:

Qt Code:
  1. treeview.cpp:56: error: no matching function for call to ‘TreeView::connect(QTreeWidgetItem*&, const char*, TreeView* const, <unresolved overloaded function type>)’
  2.  
  3. qobject.h:209: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
  4.  
  5. qobject.h:314: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
To copy to clipboard, switch view to plain text mode 

I'm not sure but I believe the reason for this is that there are no signals for QTreeWidgetItem. Please confirm if this is the reason, or if it's not, to show me a possible signal for it that will make it work. Thank you in advance.