Important: Please read the Qt Code of Conduct -

[qt creator] go to source files by F4 shortcut

  • How can I install Qt Source cpp files and tell Qt Creator to open this source file when I do ctrl+click on some method or by F4 shortcut?

    e.g. for:

    QFile myFile("a.txt");
    myFile.exi|sts(); // F4 at | char

    I have installed Sources:


    In Qt dir was of course created e:\Qt\5.9.1\Src\ folder which contains source files, how to tell Qt Creator to take into account this files?

    Thank you for any suggestions and advices.

  • Moderators

    QtCreator settings -> Debugger -> General -> Source Paths Mapping

  • I have tried many combination of paths, but still without success, I can't go to the source cpp files by F4 or ctrl+left click.


    Paths on the picture was added automatically when I clicked Add Qt sources... button, I tried with this paths too.

    I tried this source paths:


    And this target paths:


    The last one is my example project.

    And even vice versa :/

    Source paths:


    Target paths:


    Without success.

    Only one solution which I found and works, is to compile qt myself, like:

    configure -debug -nomake examples -nomake tests -opensource -confirm-license -platform win32-msvc2015 -developer-build

    When I use this kit, so F4 shortcut works as expected and even Step Into (F11) to qt sources during debugging works too.

    But I don't want to recompile qt for every new version.

    Did I Miss something?

  • So it doesn't work even with developer-build :/, so recompile myself didn't help, still any solution.

Log in to reply