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. qDebug()<< bug

qDebug()<< bug

Scheduled Pinned Locked Moved Unsolved General and Desktop
c++qdebug
3 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.
  • mandruk1331M Offline
    mandruk1331M Offline
    mandruk1331
    wrote on last edited by
    #1

    I have a problem, when I run the program by pressing ctrl+r with the help of qdebug()<<var; I see that my variable has trash in it(-12321+e smth like this), but when I run the program again in the debug mode it shows that the variable has the value which I need and the qdDbug()<<var; shows the value which I want. What can cause such situation???

    Mandruk1331

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Did you initialize var? How did you set the value which you want?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      mandruk1331M 1 Reply Last reply
      0
      • JKSHJ JKSH

        Hi,

        Did you initialize var? How did you set the value which you want?

        mandruk1331M Offline
        mandruk1331M Offline
        mandruk1331
        wrote on last edited by mandruk1331
        #3

        @JKSH Yes the value has been initialized. I init. with some minor calculations such as:
        QVector <double> B;
        for(int i=1;i<ui->RyadA->text().toInt(0,10)+1;i++){
        B.push_back(((double)i/8+1)*(i+1));
        }

        Mandruk1331

        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