This sounds like a "How long is a piece of string?" question
qDebug() returns an instance of the QDebug class. Each of the operator<< calls return a reference to the QDebug instance, which allows you to chain together << calls. When the code reaches the end of the statement (";"), the QDebug instance goes out of scope. The destructor is called, it pushes the CRLF onto the stream, flushes the stream, and closes it. That's how it "knows".





Reply With Quote
Bookmarks