0

I am trying to change QTreeView with a auto update and I am able to set path with this code

tree->setCurrentIndex(fsModel->index(QDir::currentPath())); // or any path## Heading ## Got from this link

But my question is how I can expand once CurrentIndex changed for a folder ?

Community
  • 1
  • 1
Achayan
  • 5,720
  • 2
  • 39
  • 61

1 Answers1

0

Again ignore it please tree->setExpanded(fsModel->index(QDir::currentPath())); will do that.

Achayan
  • 5,720
  • 2
  • 39
  • 61