Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt 5.0.2 Trace inside Qt source code
Forum Updated to NodeBB v4.3 + New Features

Qt 5.0.2 Trace inside Qt source code

Scheduled Pinned Locked Moved Qt Creator and other tools
15 Posts 3 Posters 6.6k Views 1 Watching
  • 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.
  • W Offline
    W Offline
    WizzZZ
    wrote on last edited by
    #2

    you would need to compile the src with -debug option, or better with the developer option -developer-build in configure

    http://harmattan-dev.nokia.com/docs/library/html/qt4/configure-options.html options for Qt4, not sure where they are for Qt 5, but check also here:

    http://qt-project.org/wiki/Building-Qt-5-from-Git

    There is only 10 types of people in the world: those who understand binary and those who don't.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      A.E72
      wrote on last edited by
      #3

      I did try to build qt from git but i'm stuck when i try to init-repository. It gave me this error :
      "GetOptionsFromArray" is not exported by the Getopt::Long module
      Can't continue after import errors at init-repository line 203
      BEGIN failed--compilation aborted at init-repository line 203.
      . i tried to Google it, i found that i'm using a wrong version of perl, although i installed the latest version of it.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        WizzZZ
        wrote on last edited by
        #4

        Compiling from source is quite a drag. If you're starting I'd suggest you get the latest installed in the Download section. It's compiled with Debug info.

        Anyway, why do you need to trace inside Qt source code? You should only have to trace inside your code, unless you're developping the API yourself.

        There is only 10 types of people in the world: those who understand binary and those who don't.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          A.E72
          wrote on last edited by
          #5

          My problem is that i'm using a progress bar wen i try to set its value the second time. it give me a segmentation fault. So i want to see what is going on? why the first setvalue() is working and not the second? and they are running in same thread (thread 1).

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Hi,

            Without some code it's a bit hard to help you, could you show us ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              A.E72
              wrote on last edited by
              #7

              hello,

              i can't give the code but i'll explain to you,

              so i have a mainwindow with a progressbar in the status bar, and in another class i'm calculating the value of the progress bar the send it by a signal:
              connect(this, SIGNAL(barValueChanged(int )), wind , SLOT(setNewValue(int ))); and i emit the signal :
              emit barValueChanged(newValue);
              and in the mainwindow the slot set the value of the progressbar :
              void MainWindow::setNewValue(int val){
              test->setValue(val); // test is the name of my progressbar
              update();
              }
              the signal triggers the signal correctly, but when executing "setValue" it give me a segmentation fault.
              So thats my problem, if you need more infos just tell me. And also it would be great if you can show me how to trace in side qt source code.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Does test point to a valid object ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  A.E72
                  wrote on last edited by
                  #9

                  ill check now !! thankx dor your fast answer

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    A.E72
                    wrote on last edited by
                    #10

                    Hi again,

                    i checked the test pointer. So it is different, when i creat the progress bar the address is 0x561ea7a and when the slot is triggered it point to 0x16c3b850. Normaly it should point to the same place right ?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Where do you initialize it ? Do you create it multiple times ? Do you delete it ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        A.E72
                        wrote on last edited by
                        #12

                        i create it in the constructor once and i dont delete it.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          A.E72
                          wrote on last edited by
                          #13

                          hi again after doing some research i did this :
                          void MainWindow::testvaluechanged(int val){
                          setUpdatesEnabled(false);
                          test->setValue(val);
                          setUpdatesEnabled(true);
                          update();
                          }

                          and its working now!!

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            Please, enclose your code with code tags, it will make it readable.

                            This workaround seems a bit fishy even if it works

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              A.E72
                              wrote on last edited by
                              #15

                              Hi again,

                              i want it to thank you for your help. For the solution i also find it fishy. But i want to tell you that i create a multiple progressdialog. I ll explain : i have a class and i create several objects of it, so each one has his own progressdialog. And i double checked the pointer is valid (my mistake). so do you think that can be where the problem is coming from ?

                              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