qt-interest@trolltech.com
[Top] [All Lists]

Re: Debug Messages w/o newline

Subject: Re: Debug Messages w/o newline
From: Till Oliver Knoll
Date: Wed, 23 Nov 2005 20:43:33 +0100
Scott Bloom schrieb:
...
-->My point was merely you _can't_ achieve this with qDebug (or not that
-->I'm aware of): qDebug ("This is one line") _always_ puts a newline
-->behind the string to be printed, so a successive qDebug ("This is
-->another line") is printed on the next line.

True, but it is easy to change with a custom message handler.

How? Off course you could simply do an
  fprinf (stderr, "%s", theQDebugString); // no endline
in the custom message handler.

but then wouldn't you loose the endline for _all_ your messages printed out with qDebug?

Cheers, Oliver

<Prev in Thread] Current Thread [Next in Thread>