[Qt-creator] extracting path/filename from selected file in navigationwidget(Project)

Hermann Fieger hermann.fieger at t-online.de
Thu Apr 9 09:17:45 CEST 2015

After including  following line

 "#include <projectexplorer/projectnodes.h>"

i was able to compile.

ProjectExplorerPlugin *plug = ProjectExplorerPlugin::instance(); // OK
ProjectExplorer::Node *nod  = plug>currentNode();                // OK
QString qs_path = nod->path();                                   // OK

Now it compiles all, but crashes, because "nod" is NULL.

So i think i made a wrong assumption. I 've not an open project,
because i deal with python3.

What i have to do, is to extract the path and filename from
the "Filesystem" navigation widget and not from the "Project"
navigation widget.

But however, can anybody show up some code, how to extract these values?

regards, Hermann

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150409/eafcfee5/attachment.html>

More information about the Qt-creator mailing list