QDebug problem



  • if string's length is over about 1200 bytes , qDebug print the string broken. but std cout print the whole string.

    is this QT framework error? i tested it on QT creator in windows

    this is test code & result.

    !http://crazygun22.g3.cc/ccc.png(broken string image)!


  • Moderators

    -Could be a problem in Qt, or it could be a limitation of the terminal-

    Doh, obviously the std variant works, so the terminal is OK. Sorry for the noise


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Which version of Qt and Qt Creator are you using ?



  • this is version information

    Qt Creator 3.3.0 (opensource)

    Based on Qt 5.4.0 (MSVC 2010, 32 bit)



  • The number of char printed seems to be 1024. I see no such limit in Qt. Maybe a limit of Qt Creator ?

    Note that qDebug and cout do not go through the same channel on Windows. cout print to stdout obviously, but qDebug send it's output to Win32's OutputDebugString. Therefor, there must be 2 different 'handlers' in Qt Creator for those.



  • Hi, sorry if this is considered necroing, but I'm having the same issue with Qt 5.5.0 and QtCreator 3.5.0 (MSVC 2013, 32 bit).

    For completeness sake, we are using MinGW (gcc 4.9.2), but I have observed the problem with older builds too.

    CrazyGun: Did you ever find a root cause, and/or a solution?

    EDIT:
    Actually, the issue seems to be with QtCreator, as I do not get the text cut off when I run the application in plain console.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.