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. Why Qt creator expression evaluator shows 2 values for 1 variable?
Forum Updated to NodeBB v4.3 + New Features

Why Qt creator expression evaluator shows 2 values for 1 variable?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 227 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.
  • S Offline
    S Offline
    StudyQt1
    wrote on last edited by StudyQt1
    #1

    Hi, I would like to ask a question: As shown in the pic, why those highlighted variables (for example [26]) have 2 values?
    Capture.PNG

    When I use qDebug() to print out, it shows "-28", but for me the correct value is "228" or "0xe4". Thank you very much

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Because QtCreator (or better the debugger used by QtCreator) doesn't know if you want to interpret the value as signed or unsigned char - signed char(-90) == unsigned char(166) == 0xa6

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      S 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        Because QtCreator (or better the debugger used by QtCreator) doesn't know if you want to interpret the value as signed or unsigned char - signed char(-90) == unsigned char(166) == 0xa6

        S Offline
        S Offline
        StudyQt1
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thank you very much, you resolved my question perfectly

        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