Hello!

I have a problem. My program's functionality depends on type of current item in QTreeWidget and of the count of selected items:

Qt Code:
  1. // Signal currentItemChanged(...) handler
  2. void Class1::Handler(QTreeWidgetItem* pCurItem, QTreeWidgetItem * pPrevItem)
  3. {
  4. ..
  5. if (tree->selectedItems().count() > 1)
  6. {
  7. ...
  8. }
  9. else
  10. {
  11. if (pCurItem->data(0, Qt::UserRole).toString() == "example1")
  12. {
  13. ...
  14. }
  15. else
  16. {
  17. ...
  18. }
  19. }
  20. }
To copy to clipboard, switch view to plain text mode 

QTreeWidget selection mode is ExtendedSelection.
For example, i select in tree 5 items (by mouse). It works correct.
> Item1
> Item2
> Item3
> Item4
> Item5

Then, i click to one item of that 5.
Item1
Item2
> Item3
Item4
Item5

And here is the problem. My handler works as if it was selected 5 items...Maybe QTreeWidget class has some function, that force tree to refresh selected list?

Thank you!