Hi,

the selected item may be different than the current item, so it's really up to you to decide if you want the selected item to be current or not.
Yes, I want.

Thanks, but I have another question:
I have a root item, I create a child and I insert a QComboBox into column 1 of this child. I've connected the "QComboBox::currentIndexChanged(int)" to a SLOT. When the SLOT is called I want to get the item that is in the column 0.

Qt Code:
  1. ...
  2. pqItem = new QTreeWidgetItem(pqRoot);
  3. pqComboBox = new QComboBox();
  4. m_pqTree->setItemWidget(pqItem ,1,pqComboBox);
  5. connect(pqComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(setMode(int)));
  6. ...
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void myClass::setMode(int)
  2. {
  3. //Here I want to get the QTreeWidgetItem*. I have tested QObject::sender()->parent(), but I don't really know if it is its parent.
  4. }
To copy to clipboard, switch view to plain text mode 

The problem is that when I click on the QComboBox, the QTreeWidgetItem* is not selected and I don't want to force first click the item an then let change the combo.

Thanks,