Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [SOLVED] Qt Creator and debugging Qt sources

    General and Desktop
    3
    11
    13348
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dakron last edited by

      Hello,

      I would like to debug the Qt under the Qt Creator.
      I downloaded the latest source code from the repository, then it was built to debug version and Qt Creator Tools->Options->Qt4 was updated to point to the new built directory (new debug build configuration is visible in project's build settings).
      It looks that I missed something because I can not step into the Qt sources during debugging the simple application.
      Does anyone have the same problem ? Do I need to configure GDB separately ?

      Operating system: Linux Fedora 15
      Qt Creator: 2.2.1
      g++ (gcc): 4.6.0

      Kind Regards
      Pawel

      1 Reply Last reply Reply Quote 0
      • H
        HuXiKa last edited by

        So if you add a break point anywhere in your code, it won't stop there during debugging? Thats really odd.

        If you can find faults of spelling in the text above, you can keep them.

        1 Reply Last reply Reply Quote 0
        • D
          dakron last edited by

          I have the simple code like this (the environment like in my first post):

          @
          #include <QApplication>
          #include <QLabel>

          int main(int argc, char *argv[])
          {
          QApplication a(argc, argv);

          QLabel* label = new QLabel();
          label->setText("TEST");
          label->show();
          
          return a.exec&#40;&#41;;
          

          }
          @

          I put the break point on the line
          @
          label->setText("TEST");
          @
          and it stops there successfully. Then I would like to step into to the setText() method but Qt Creator does not see the Qt sources.

          1 Reply Last reply Reply Quote 0
          • H
            HuXiKa last edited by

            Oh I see. Well, my first advice would be to read "this":http://stackoverflow.com/questions/5049578/need-to-step-into-qt-sources-my-ide-is-qt-creator and "this":http://stackoverflow.com/questions/3395048/how-to-see-qt-source-code-while-coding-by-qt-creator . I followed these steps and I never encountered your problem.

            If you can find faults of spelling in the text above, you can keep them.

            1 Reply Last reply Reply Quote 0
            • D
              dakron last edited by

              Thanks for the link but I saw them before. Maybe this is the problem (bug?) with Qt Creator ?

              1 Reply Last reply Reply Quote 0
              • H
                HuXiKa last edited by

                Can you access the source files if not in debug mode?

                If you can find faults of spelling in the text above, you can keep them.

                1 Reply Last reply Reply Quote 0
                • D
                  dakron last edited by

                  What do you mean ? "Follow symbol under cursor" ? It looks like the headers file are accessible only...

                  1 Reply Last reply Reply Quote 0
                  • H
                    HuXiKa last edited by

                    Yup, I meant that. It seems like something went wrong with the build, try to rebuild everything from source.

                    If you can find faults of spelling in the text above, you can keep them.

                    1 Reply Last reply Reply Quote 0
                    • L
                      lgeyer last edited by

                      Qt Creator > Tools > Options > Debugger > Source Path Mapping > Add / Add Qt sources...

                      1 Reply Last reply Reply Quote 1
                      • D
                        dakron last edited by

                        I rebuilt the library and installed into default location and now it works fine. Thank you for help!

                        1 Reply Last reply Reply Quote 0
                        • H
                          HuXiKa last edited by

                          You're welcome. Please set your thread as [SOLVED] if you're problem is gone :)

                          If you can find faults of spelling in the text above, you can keep them.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post