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. Expression evaluator to see a particular field of a struct?

Expression evaluator to see a particular field of a struct?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 2 Posters 741 Views 2 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    can i enter an expression, as one can in Xcode, to view a particular field of a struct as the "value" of said struct?
    eg: if i have this lovely struct:

    0_1548962799938_Screen Shot 2019-01-31 at 11.26.26 AM.png

    and i just want "this" to show "this->i_description.i_uni.i_nameP", so that i do NOT have to drill down to it every time, just see the value (in red) right next to "this"?

    eg: in Xcode i can enter this expression

    {$VAR.i_description.i_uni.i_nameP}:s
    

    and then see "Main Thread Queue" as expected. How do we do this in Qt?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #2

      does anyone have any ideas here?

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by Chris Kawa
        #3

        It's not specific to Qt. It's specific to the debugger. You didn't say which debugger you're using and on which platform.
        With CDB on Windows at least you simply write this->i_description.i_uni.i_nameP just like in code with no special syntax.

        1 Reply Last reply
        2
        • D Offline
          D Offline
          davecotter
          wrote on last edited by
          #4

          i need a solution for both mac and windows (mac: xcode, windows: Visual Studio 2017)

          note i don't want to type that into the expressions window, or have to look in a different panel. i want to just see it in place next to "this" every time i run the debugger (as you can do with Xcode)

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Sorry, I never had a mac in my hands so "like in XCode" doesn't tell me much. Do you have something like debugging helpers in mind?

            1 Reply Last reply
            1

            • Login

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