0

Currently, I have this code:

QFileSystemModel *model = new QFileSystemModel();
sc_me->ui->treeView_2->setAnimated(true);
sc_me->ui->treeView_2->setSortingEnabled(true);
sc_me->ui->treeView_2->setModel(model);
sc_me->ui->treeView_2->setRootIndex(model->index(webSite));

And it will only let me view directories leading up to the directory that the file is being run in, so if it's being run in c:/directory1/directory2, I can't view c:/dir42, only c:/directory1/directory2/

ymoreau
  • 3,402
  • 1
  • 22
  • 60
JVE999
  • 3,327
  • 10
  • 54
  • 89
  • 1
    And what would be `model->index(webSite)`? Maybe it is incorrect and resorts to default path, which is application working directory? – Oleg Pyzhcov Mar 22 '14 at 05:59
  • I've tried a variety of directories. It shows the directory if it's a parent directory or a sub directory, but that's it. – JVE999 Mar 24 '14 at 06:33

0 Answers0