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.
  • M Offline
    M Offline
    mandruk1331
    wrote on 9 Mar 2016, 23:26 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
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 10 Mar 2016, 03:50 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

      M 1 Reply Last reply 10 Mar 2016, 09:22
      0
      • J JKSH
        10 Mar 2016, 03:50

        Hi,

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

        M Offline
        M Offline
        mandruk1331
        wrote on 10 Mar 2016, 09:22 last edited by mandruk1331 3 Oct 2016, 09:22
        #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

        3/3

        10 Mar 2016, 09:22

        • Login

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