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. Problem getting value of variable with debugger

Problem getting value of variable with debugger

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.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.
  • J Offline
    J Offline
    jularaXD
    wrote on 9 Feb 2015, 12:34 last edited by
    #1

    Hi guys

    I come from programming with delphi, where the debugger gave me the value of variables when the mouse placed on them, but in some variables on QT, the rectangle shows me the value only a split second and it turns grey, as shown in the picture below.
    "http://nsae02.casimages.net/img/2015/02/09/150209013256164365.png":http://nsae02.casimages.net/img/2015/02/09/150209013256164365.png

    What is the problem?
    Thanks in advance!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agabor
      wrote on 9 Feb 2015, 14:15 last edited by
      #2

      Looks like a bug in Qt Creator. But there is an other option: on the right side there is a panel where you can browse your local variables. If I see it correctly then sequndos is a member variable. Open the this pointer in the panel, and you will find the value there.

      Older Qt Creators didn't even have this tooltip-like debug feature, they only had the side panel :)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jularaXD
        wrote on 9 Feb 2015, 16:36 last edited by
        #3

        Thanks for you reply, Gábor, but I don't find some variables on right side :(
        I made a video of my problem.
        https://www.youtube.com/watch?v=OVwY9gJosig

        1 Reply Last reply
        0
        • A Offline
          A Offline
          agabor
          wrote on 9 Feb 2015, 20:19 last edited by
          #4

          I see what you mean, it is indeed annoying. About the right side panel: there are some variables that I also don't see (horas, minutos, segundos), but from this context it is hard to tell where they belong. Are they local or member? Do they belong to a base class? Is there a base class at all?

          If nothing works there is still one more trick: right click on the right side panel, and choose "Add new expression evaluator .." and type the variable there.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jularaXD
            wrote on 10 Feb 2015, 11:21 last edited by
            #5

            horas, minutos, segundos was created on the header of .cpp file, and structs was created in other class and constructed on the header of main.
            However, your trick works fine!!!

            Thanks a lot!!

            1 Reply Last reply
            0

            1/5

            9 Feb 2015, 12:34

            • Login

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