summaryrefslogtreecommitdiffstats
path: root/examples/quick/controls/filesystembrowser/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/controls/filesystembrowser/main.cpp')
-rw-r--r--examples/quick/controls/filesystembrowser/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/quick/controls/filesystembrowser/main.cpp b/examples/quick/controls/filesystembrowser/main.cpp
index 176d334c4..1322bc497 100644
--- a/examples/quick/controls/filesystembrowser/main.cpp
+++ b/examples/quick/controls/filesystembrowser/main.cpp
@@ -137,6 +137,7 @@ int main(int argc, char *argv[])
fsm->setRootPath(QDir::homePath());
fsm->setResolveSymlinks(true);
engine.rootContext()->setContextProperty("fileSystemModel", fsm);
+ engine.rootContext()->setContextProperty("rootPathIndex", fsm->index(fsm->rootPath()));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();