Hello,
I have a object on the left and a treewidget on the right.When I selected an item from the right, I want object to change its color.
Here is my code:
Qt Code:
  1. glWidget = new GLWidget;
  2. tree = new QTreeWidget;
  3. tree->setHeaderLabel("Items");
  4. qtItem = new QTreeWidgetItem(tree);
  5. qtItem->setText(0, tr("QtLogo"));
  6. connect(qtItem , SIGNAL(isSelected()), glWidget, SLOT(setHighlighted()));
To copy to clipboard, switch view to plain text mode 

However it gives me an error:

"\Window.cpp(50) : error C2664: 'bool QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)' : cannot convert parameter 1 from 'QTreeWidgetItem' to 'const QObject *'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"

I did not understand the mistake, help me pls.