1

I want to step into Qt source code to see how some of its functions work. But I can't step into the Qt source code.

What I've tried:

  • Tools - Options - Debugger - General - Add Qt sources... - select Qt source folder (D:\Qt\Qt5.14.1\5.14.1\Src, which is installed along with installation of Qt 5.14.1)
  • Tools - Options - Debugger - CDB Paths - Insert Symbol Server... - click OK with default value.
  • new project with code:
#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QLabel l;
    l.show();
    return app.exec();
}

  • add breakpoint at l.show().
  • start debugging

and still can't step into the Qt function QLabel::show().

What had I missed ?

Thanks a lot.


Environment:
Windows 10
Qt 5.14.1 with MSVC 2017
Microsoft Visual Studio 2019

cangyin
  • 43
  • 7
  • I think you mean that a window pops-up asking where to look for `QLabel.h` the first time, and every time after VS pops-up a tab saying "Source Not Found"? I have this problem too, but I'm able to compile and run all my projects (in Debug mode), [not in release Mode](https://stackoverflow.com/questions/62559840/how-to-solve-the-no-qt-platform-plugin-could-be-initialized-problem). Just for curiosity: are you able to run a template in release mode? Thanks. –  Jul 15 '20 at 19:32
  • @BlayerBond Sure, It compiles both in debug mode and release mode. I just want to see underneath the Qt source. – cangyin Jul 16 '20 at 01:21
  • hm that's sad. I hoped the _no-release_ problem and the _source-not-found_ problem were linked together, so a more common solution was needed. –  Jul 16 '20 at 09:52

0 Answers0