Remove qDebug() newline?



  • Hi All, is it possible to have qDebug() not append the newline?



  • The output is emitted and end-of-line added when the QDebug object is destroyed. The typical usage pattern creates a temporary QDebug object that is used and destroyed immediately. Control its scope to control when it outputs:
    @
    QDebug dbg(QtDebugMsg);

    dbg << "One";
    dbg << "Two";
    @



  • thanks a million.



  • [quote author="ChrisW67" date="1351030309"]The output is emitted and end-of-line added when the QDebug object is destroyed. The typical usage pattern creates a temporary QDebug object that is used and destroyed immediately. Control its scope to control when it outputs:
    @
    QDebug dbg(QtDebugMsg);

    dbg << "One";
    dbg << "Two";
    @[/quote]

    Woww..!! This is new for me... Thanks a Lot... hope will learn some more new things like this.. :)


Log in to reply
 

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