I create a class as follows:
Qt Code:
  1. class CTreeClass:public QTreeWidget
  2. {
  3. public:
  4. CTreeClass(QWidget *parent);
  5. public slots:
  6. void showMessage(QTreeWidgetItem *item, int index);
  7. };
To copy to clipboard, switch view to plain text mode 
and in the function CTreeClass,the part of code as follows:
Qt Code:
  1. CTreeClass::CTreeClass(QWidget *parent)
  2. :QTreeWidget(parent)
  3. {
  4. ...
  5. QObject::connect(this,SIGNAL(itemClicked(QTreeWidgetItem *, int)),this,SLOT(showMessage(QTreeWidgetItem *, int)));
  6. ....
  7. }
To copy to clipboard, switch view to plain text mode 
The function showMessage is only show a message(as a test),but when I click the item of the tree,nothing does,Why?