Qt Creator: View (and debug into) Qt Sources?
Hello,
In the Qt SDK installer I’ve got the “Qt Sources” installed.
When using Qt Creator (With MinGW), how do I:
- Jump to the implementation of a given Qt supplied object or it’s methods? F2 only takes me to the header files. (Implementation details would be useful for virtual functions I’m supposed to re-implement)
- Step in to the Qt source files when debugging. Now, I only see the assembly code for any Qt library frames on the call stack.
Thank you
11 replies
@Andre: Having the sources alone is not sufficient if the libraries are not directly build from it. At the very least you need to create an association from the location where the sources were at compile time to the place were the sources are installed. There’s an item in the debugger options, “General” settings.
Qt Creator 2.2 final is already released, see:
http://labs.qt.nokia.com/2011/05/06/qt-creator-2-2-released/
I was having problems despite seeing the feature for the source. I am adding this in hopes that it will save others some time. I am using the QtSDK with QtCreator 2.4.1, and I have downloaded the source using the QtSDK package manger. The source is located in the default path (relative to the SDK root) C:\QtSDK\QtSources\4.8.0.
In the QtCreator options, under Debugger->General you need to click on “Add Qt sources…”. Then you need to select C:\QtSDK\QtSources\4.8.0. I was originally making the mistake of selecting C:\QtSDK\QtSources\4.8.0\src – which obviously was failing.
Once you OK out of the dialog you should be able to debug into the Qt source code in QtCreator.
I was having problems despite seeing the feature for the source. I am adding this in hopes that it will save others some time. I am using the QtSDK with QtCreator 2.4.1, and I have downloaded the source using the QtSDK package manger. The source is located in the default path (relative to the SDK root) C:\QtSDK\QtSources\4.8.0.In the QtCreator options, under Debugger->General you need to click on “Add Qt sources…”. Then you need to select C:\QtSDK\QtSources\4.8.0. I was originally making the mistake of selecting C:\QtSDK\QtSources\4.8.0\src – which obviously was failing.
Once you OK out of the dialog you should be able to debug into the Qt source code in QtCreator.
Thank you for your solution. :)
You must log in to post a reply. Not a member yet? Register here!




