Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt Creator and debugging Qt sources
QtWS25 Last Chance

[SOLVED] Qt Creator and debugging Qt sources

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 14.2k Views
  • 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 Offline
    D Offline
    dakron
    wrote on last edited by
    #1

    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
    0
    • H Offline
      H Offline
      HuXiKa
      wrote on last edited by
      #2

      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
      0
      • D Offline
        D Offline
        dakron
        wrote on last edited by
        #3

        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
        0
        • H Offline
          H Offline
          HuXiKa
          wrote on last edited by
          #4

          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
          0
          • D Offline
            D Offline
            dakron
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • H Offline
              H Offline
              HuXiKa
              wrote on last edited by
              #6

              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
              0
              • D Offline
                D Offline
                dakron
                wrote on last edited by
                #7

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

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  HuXiKa
                  wrote on last edited by
                  #8

                  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
                  0
                  • L Offline
                    L Offline
                    lgeyer
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    1
                    • D Offline
                      D Offline
                      dakron
                      wrote on last edited by
                      #10

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

                      1 Reply Last reply
                      0
                      • H Offline
                        H Offline
                        HuXiKa
                        wrote on last edited by
                        #11

                        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
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved