<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qdebug.cpp --> <title>QDebug Class | Qt Core 5.12.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QDebug</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtcore-index.html">Qt 5.12.6 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#related-non-members">Related Non-Members</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> <li class="level2"><a href="#basic-use">Basic Use</a></li> <li class="level2"><a href="#formatting-options">Formatting Options</a></li> <li class="level2"><a href="#writing-custom-types-to-a-stream">Writing Custom Types to a Stream</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QDebug Class</h1> <!-- $$$QDebug-brief --> <p>The <a href="qdebug.html">QDebug</a> class provides an output stream for debugging information. <a href="#details">More...</a></p> <!-- @@@QDebug --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QDebug></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr></table></div><ul> <li><a href="qdebug-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#QDebug">QDebug</a></b>(QIODevice *<i>device</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#QDebug-1">QDebug</a></b>(QString *<i>string</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#QDebug-2">QDebug</a></b>(QtMsgType <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#QDebug-3">QDebug</a></b>(const QDebug &<i>o</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#dtor.QDebug">~QDebug</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#autoInsertSpaces">autoInsertSpaces</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#maybeQuote">maybeQuote</a></b>(char <i>c</i> = '"')</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#maybeSpace">maybeSpace</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#noquote">noquote</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#nospace">nospace</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#quote">quote</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#resetFormat">resetFormat</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#setAutoInsertSpaces">setAutoInsertSpaces</a></b>(bool <i>b</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#setVerbosity">setVerbosity</a></b>(int <i>verbosityLevel</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#space">space</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#swap">swap</a></b>(QDebug &<i>other</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#verbosity">verbosity</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt">operator<<</a></b>(QChar <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-1">operator<<</a></b>(bool <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-2">operator<<</a></b>(char <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-3">operator<<</a></b>(short <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-4">operator<<</a></b>(unsigned short <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-5">operator<<</a></b>(char16_t <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-6">operator<<</a></b>(char32_t <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-7">operator<<</a></b>(int <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-8">operator<<</a></b>(unsigned int <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-9">operator<<</a></b>(long <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-10">operator<<</a></b>(unsigned long <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-11">operator<<</a></b>(qint64 <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-12">operator<<</a></b>(quint64 <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-13">operator<<</a></b>(float <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-14">operator<<</a></b>(double <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-15">operator<<</a></b>(const char *<i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-16">operator<<</a></b>(const QString &<i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-17">operator<<</a></b>(const QStringRef &<i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-18">operator<<</a></b>(QStringView <i>s</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-19">operator<<</a></b>(QLatin1String <i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-20">operator<<</a></b>(const QByteArray &<i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-21">operator<<</a></b>(const void *<i>t</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug &</td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-eq">operator=</a></b>(const QDebug &<i>other</i>)</td></tr> </table></div> <a name="related-non-members"></a> <h2 id="related-non-members">Related Non-Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-25">operator<<</a></b>(QDebug <i>debug</i>, const QList<T> &<i>list</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-26">operator<<</a></b>(QDebug <i>debug</i>, const std::list<T, Alloc> &<i>vec</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-27">operator<<</a></b>(QDebug <i>debug</i>, const QVector<T> &<i>vec</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-28">operator<<</a></b>(QDebug <i>debug</i>, const std::vector<T, Alloc> &<i>vec</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-29">operator<<</a></b>(QDebug <i>debug</i>, const QSet<T> &<i>set</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-30">operator<<</a></b>(QDebug <i>debug</i>, const QMap<Key, T> &<i>map</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-31">operator<<</a></b>(QDebug <i>debug</i>, const std::map<Key, T, Compare, Alloc> &<i>map</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-32">operator<<</a></b>(QDebug <i>debug</i>, const std::multimap<Key, T, Compare, Alloc> &<i>map</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-33">operator<<</a></b>(QDebug <i>debug</i>, const QHash<Key, T> &<i>hash</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-34">operator<<</a></b>(QDebug <i>debug</i>, const QPair<T1, T2> &<i>pair</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDebug </td><td class="memItemRight bottomAlign"><b><a href="qdebug.html#operator-lt-lt-35">operator<<</a></b>(QDebug <i>debug</i>, const QFlags<T> &<i>flags</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QDebug-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qdebug.html">QDebug</a> class provides an output stream for debugging information.</p> <p><a href="qdebug.html">QDebug</a> is used whenever the developer needs to write out debugging or tracing information to a device, file, string or console.</p> <a name="basic-use"></a> <h3 >Basic Use</h3> <p>In the common case, it is useful to call the <a href="qtglobal.html#qDebugx">qDebug</a>() function to obtain a default <a href="qdebug.html">QDebug</a> object to use for writing debugging information.</p> <pre class="cpp"> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Date:"</span> <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qdate.html">QDate</a></span><span class="operator">::</span>currentDate(); <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Types:"</span> <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"String"</span>) <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qchar.html">QChar</a></span>(<span class="char">'x'</span>) <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qrect.html">QRect</a></span>(<span class="number">0</span><span class="operator">,</span> <span class="number">10</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span> <span class="number">40</span>); <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Custom coordinate type:"</span> <span class="operator"><</span><span class="operator"><</span> coordinate; </pre> <p>This constructs a <a href="qdebug.html">QDebug</a> object using the constructor that accepts a <a href="qtglobal.html#QtMsgType-enum">QtMsgType</a> value of <a href="qtglobal.html#QtMsgType-enum">QtDebugMsg</a>. Similarly, the <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>() and <a href="qtglobal.html#qFatal">qFatal</a>() functions also return <a href="qdebug.html">QDebug</a> objects for the corresponding message types.</p> <p>The class also provides several constructors for other situations, including a constructor that accepts a <a href="qfile.html">QFile</a> or any other <a href="qiodevice.html">QIODevice</a> subclass that is used to write debugging information to files and other devices. The constructor that accepts a <a href="qstring.html">QString</a> is used to write to a string for display or serialization.</p> <a name="formatting-options"></a> <h3 >Formatting Options</h3> <p><a href="qdebug.html">QDebug</a> formats output so that it's easily readable. It automatically adds spaces between arguments, and adds quotes around <a href="qstring.html">QString</a>, <a href="qbytearray.html">QByteArray</a>, <a href="qchar.html">QChar</a> arguments.</p> <p>You can tweak these options through the <a href="qdebug.html#space">space</a>(), <a href="qdebug.html#nospace">nospace</a>() and <a href="qdebug.html#quote">quote</a>(), <a href="qdebug.html#noquote">noquote</a>() methods. Furthermore, <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a> can be piped into a <a href="qdebug.html">QDebug</a> stream.</p> <p><a href="qdebugstatesaver.html">QDebugStateSaver</a> limits changes to the formatting to the current scope. <a href="qdebug.html#resetFormat">resetFormat</a>() resets the options to the default ones.</p> <a name="writing-custom-types-to-a-stream"></a> <h3 >Writing Custom Types to a Stream</h3> <p>Many standard types can be written to <a href="qdebug.html">QDebug</a> objects, and Qt provides support for most Qt value types. To add support for custom types, you need to implement a streaming operator, as in the following example:</p> <pre class="cpp"> <span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="keyword">operator</span><span class="operator"><</span><span class="operator"><</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> debug<span class="operator">,</span> <span class="keyword">const</span> Coordinate <span class="operator">&</span>c) { <span class="type"><a href="qdebugstatesaver.html">QDebugStateSaver</a></span> saver(debug); debug<span class="operator">.</span>nospace() <span class="operator"><</span><span class="operator"><</span> <span class="char">'('</span> <span class="operator"><</span><span class="operator"><</span> c<span class="operator">.</span>x() <span class="operator"><</span><span class="operator"><</span> <span class="string">", "</span> <span class="operator"><</span><span class="operator"><</span> c<span class="operator">.</span>y() <span class="operator"><</span><span class="operator"><</span> <span class="char">')'</span>; <span class="keyword">return</span> debug; } </pre> <p>This is described in the Debugging Techniques and <a href="custom-types.html#making-the-type-printable">Creating Custom Qt Types</a> documents.</p> </div> <!-- @@@QDebug --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QDebug[overload1]$$$QDebugQIODevice* --> <h3 class="fn" id="QDebug"><a name="QDebug"></a>QDebug::<span class="name">QDebug</span>(<span class="type"><a href="qiodevice.html">QIODevice</a></span> *<i>device</i>)</h3> <p>Constructs a debug stream that writes to the given <i>device</i>.</p> <!-- @@@QDebug --> <!-- $$$QDebug$$$QDebugQString* --> <h3 class="fn" id="QDebug-1"><a name="QDebug-1"></a>QDebug::<span class="name">QDebug</span>(<span class="type"><a href="qstring.html">QString</a></span> *<i>string</i>)</h3> <p>Constructs a debug stream that writes to the given <i>string</i>.</p> <!-- @@@QDebug --> <!-- $$$QDebug$$$QDebugQtMsgType --> <h3 class="fn" id="QDebug-2"><a name="QDebug-2"></a>QDebug::<span class="name">QDebug</span>(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span> <i>t</i>)</h3> <p>Constructs a debug stream that writes to the handler for the message type <i>t</i>.</p> <!-- @@@QDebug --> <!-- $$$QDebug$$$QDebugconstQDebug& --> <h3 class="fn" id="QDebug-3"><a name="QDebug-3"></a>QDebug::<span class="name">QDebug</span>(const <span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &<i>o</i>)</h3> <p>Constructs a copy of the other debug stream <i>o</i>.</p> <!-- @@@QDebug --> <!-- $$$~QDebug[overload1]$$$~QDebug --> <h3 class="fn" id="dtor.QDebug"><a name="dtor.QDebug"></a>QDebug::<span class="name">~QDebug</span>()</h3> <p>Flushes any pending data to be written and destroys the debug stream.</p> <!-- @@@~QDebug --> <!-- $$$autoInsertSpaces[overload1]$$$autoInsertSpaces --> <h3 class="fn" id="autoInsertSpaces"><a name="autoInsertSpaces"></a><span class="type">bool</span> QDebug::<span class="name">autoInsertSpaces</span>() const</h3> <p>Returns <code>true</code> if this <a href="qdebug.html">QDebug</a> instance will automatically insert spaces between writes.</p> <p>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qdebug.html#setAutoInsertSpaces">setAutoInsertSpaces</a>() and <a href="qdebugstatesaver.html">QDebugStateSaver</a>.</p> <!-- @@@autoInsertSpaces --> <!-- $$$maybeQuote[overload1]$$$maybeQuotechar --> <h3 class="fn" id="maybeQuote"><a name="maybeQuote"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">maybeQuote</span>(<span class="type">char</span> <i>c</i> = '"')</h3> <p>Writes a character <i>c</i> to the debug stream, depending on the current setting for automatic insertion of quotes, and returns a reference to the stream.</p> <p>The default character is a double quote <code>"</code>.</p> <p>This function was introduced in Qt 5.4.</p> <p><b>See also </b><a href="qdebug.html#quote">quote</a>() and <a href="qdebug.html#noquote">noquote</a>().</p> <!-- @@@maybeQuote --> <!-- $$$maybeSpace[overload1]$$$maybeSpace --> <h3 class="fn" id="maybeSpace"><a name="maybeSpace"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">maybeSpace</span>()</h3> <p>Writes a space character to the debug stream, depending on the current setting for automatic insertion of spaces, and returns a reference to the stream.</p> <p><b>See also </b><a href="qdebug.html#space">space</a>() and <a href="qdebug.html#nospace">nospace</a>().</p> <!-- @@@maybeSpace --> <!-- $$$noquote[overload1]$$$noquote --> <h3 class="fn" id="noquote"><a name="noquote"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">noquote</span>()</h3> <p>Disables automatic insertion of quotation characters around <a href="qchar.html">QChar</a>, <a href="qstring.html">QString</a> and <a href="qbytearray.html">QByteArray</a> contents and returns a reference to the stream.</p> <p>When quoting is disabled, these types are printed without quotation characters and without escaping of non-printable characters.</p> <p>This function was introduced in Qt 5.4.</p> <p><b>See also </b><a href="qdebug.html#quote">quote</a>() and <a href="qdebug.html#maybeQuote">maybeQuote</a>().</p> <!-- @@@noquote --> <!-- $$$nospace[overload1]$$$nospace --> <h3 class="fn" id="nospace"><a name="nospace"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">nospace</span>()</h3> <p>Disables automatic insertion of spaces and returns a reference to the stream.</p> <p><b>See also </b><a href="qdebug.html#space">space</a>() and <a href="qdebug.html#maybeSpace">maybeSpace</a>().</p> <!-- @@@nospace --> <!-- $$$quote[overload1]$$$quote --> <h3 class="fn" id="quote"><a name="quote"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">quote</span>()</h3> <p>Enables automatic insertion of quotation characters around <a href="qchar.html">QChar</a>, <a href="qstring.html">QString</a> and <a href="qbytearray.html">QByteArray</a> contents and returns a reference to the stream.</p> <p>Quoting is enabled by default.</p> <p>This function was introduced in Qt 5.4.</p> <p><b>See also </b><a href="qdebug.html#noquote">noquote</a>() and <a href="qdebug.html#maybeQuote">maybeQuote</a>().</p> <!-- @@@quote --> <!-- $$$resetFormat[overload1]$$$resetFormat --> <h3 class="fn" id="resetFormat"><a name="resetFormat"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">resetFormat</span>()</h3> <p>Resets the stream formatting options, bringing it back to its original constructed state.</p> <p>This function was introduced in Qt 5.4.</p> <p><b>See also </b><a href="qdebug.html#space">space</a>() and <a href="qdebug.html#quote">quote</a>().</p> <!-- @@@resetFormat --> <!-- $$$setAutoInsertSpaces[overload1]$$$setAutoInsertSpacesbool --> <h3 class="fn" id="setAutoInsertSpaces"><a name="setAutoInsertSpaces"></a><span class="type">void</span> QDebug::<span class="name">setAutoInsertSpaces</span>(<span class="type">bool</span> <i>b</i>)</h3> <p>Enables automatic insertion of spaces between writes if <i>b</i> is true; otherwise automatic insertion of spaces is disabled.</p> <p>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qdebug.html#autoInsertSpaces">autoInsertSpaces</a>() and <a href="qdebugstatesaver.html">QDebugStateSaver</a>.</p> <!-- @@@setAutoInsertSpaces --> <!-- $$$setVerbosity[overload1]$$$setVerbosityint --> <h3 class="fn" id="setVerbosity"><a name="setVerbosity"></a><span class="type">void</span> QDebug::<span class="name">setVerbosity</span>(<span class="type">int</span> <i>verbosityLevel</i>)</h3> <p>Sets the verbosity of the stream to <i>verbosityLevel</i>.</p> <p>The allowed range is from 0 to 7. The default value is 2.</p> <p>This function was introduced in Qt 5.6.</p> <p><b>See also </b><a href="qdebug.html#verbosity">verbosity</a>().</p> <!-- @@@setVerbosity --> <!-- $$$space[overload1]$$$space --> <h3 class="fn" id="space"><a name="space"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">space</span>()</h3> <p>Writes a space character to the debug stream and returns a reference to the stream.</p> <p>The stream remembers that automatic insertion of spaces is enabled for future writes.</p> <p><b>See also </b><a href="qdebug.html#nospace">nospace</a>() and <a href="qdebug.html#maybeSpace">maybeSpace</a>().</p> <!-- @@@space --> <!-- $$$swap[overload1]$$$swapQDebug& --> <h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QDebug::<span class="name">swap</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &<i>other</i>)</h3> <p>Swaps this debug stream instance with <i>other</i>. This function is very fast and never fails.</p> <p>This function was introduced in Qt 5.0.</p> <!-- @@@swap --> <!-- $$$verbosity[overload1]$$$verbosity --> <h3 class="fn" id="verbosity"><a name="verbosity"></a><span class="type">int</span> QDebug::<span class="name">verbosity</span>() const</h3> <p>Returns the verbosity of the debug stream.</p> <p>Streaming operators can check the value to decide whether verbose output is desired and print more information depending on the level. Higher values indicate that more information is desired.</p> <p>The allowed range is from 0 to 7. The default value is 2.</p> <p>This function was introduced in Qt 5.6.</p> <p><b>See also </b><a href="qdebug.html#setVerbosity">setVerbosity</a>().</p> <!-- @@@verbosity --> <!-- $$$operator<<[overload1]$$$operator<<QChar --> <h3 class="fn" id="operator-lt-lt"><a name="operator-lt-lt"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>t</i>)</h3> <p>Writes the character, <i>t</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints control characters and non-US-ASCII characters as their C escape sequences or their Unicode value (\u1234). To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality, but note that some <a href="qdebug.html">QDebug</a> backends may not be 8-bit clean and may not be able to represent <code>t</code>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<bool --> <h3 class="fn" id="operator-lt-lt-1"><a name="operator-lt-lt-1"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">bool</span> <i>t</i>)</h3> <p>Writes the boolean value, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<char --> <h3 class="fn" id="operator-lt-lt-2"><a name="operator-lt-lt-2"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">char</span> <i>t</i>)</h3> <p>Writes the character, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<short --> <h3 class="fn" id="operator-lt-lt-3"><a name="operator-lt-lt-3"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">short</span> <i>t</i>)</h3> <p>Writes the signed short integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<unsignedshort --> <h3 class="fn" id="operator-lt-lt-4"><a name="operator-lt-lt-4"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">unsigned</span> <span class="type">short</span> <i>t</i>)</h3> <p>Writes then unsigned short integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<char16_t --> <h3 class="fn" id="operator-lt-lt-5"><a name="operator-lt-lt-5"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">char16_t</span> <i>t</i>)</h3> <p>Writes the UTF-16 character, <i>t</i>, to the stream and returns a reference to the stream.</p> <p>This function was introduced in Qt 5.5.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<char32_t --> <h3 class="fn" id="operator-lt-lt-6"><a name="operator-lt-lt-6"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">char32_t</span> <i>t</i>)</h3> <p>Writes the UTF-32 character, <i>t</i>, to the stream and returns a reference to the stream.</p> <p>This function was introduced in Qt 5.5.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<int --> <h3 class="fn" id="operator-lt-lt-7"><a name="operator-lt-lt-7"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">int</span> <i>t</i>)</h3> <p>Writes the signed integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<unsignedint --> <h3 class="fn" id="operator-lt-lt-8"><a name="operator-lt-lt-8"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">unsigned</span> <span class="type">int</span> <i>t</i>)</h3> <p>Writes then unsigned integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<long --> <h3 class="fn" id="operator-lt-lt-9"><a name="operator-lt-lt-9"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">long</span> <i>t</i>)</h3> <p>Writes the signed long integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<unsignedlong --> <h3 class="fn" id="operator-lt-lt-10"><a name="operator-lt-lt-10"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">unsigned</span> <span class="type">long</span> <i>t</i>)</h3> <p>Writes then unsigned long integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<qint64 --> <h3 class="fn" id="operator-lt-lt-11"><a name="operator-lt-lt-11"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> <i>t</i>)</h3> <p>Writes the signed 64-bit integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<quint64 --> <h3 class="fn" id="operator-lt-lt-12"><a name="operator-lt-lt-12"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type"><a href="qtglobal.html#quint64-typedef">quint64</a></span> <i>t</i>)</h3> <p>Writes then unsigned 64-bit integer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<float --> <h3 class="fn" id="operator-lt-lt-13"><a name="operator-lt-lt-13"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">float</span> <i>t</i>)</h3> <p>Writes the 32-bit floating point number, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<double --> <h3 class="fn" id="operator-lt-lt-14"><a name="operator-lt-lt-14"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type">double</span> <i>t</i>)</h3> <p>Writes the 64-bit floating point number, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<constchar* --> <h3 class="fn" id="operator-lt-lt-15"><a name="operator-lt-lt-15"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(const <span class="type">char</span> *<i>t</i>)</h3> <p>Writes the '\0'-terminated string, <i>t</i>, to the stream and returns a reference to the stream. The string is never quoted nor transformed to the output, but note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<constQString& --> <h3 class="fn" id="operator-lt-lt-16"><a name="operator-lt-lt-16"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>t</i>)</h3> <p>Writes the string, <i>t</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints the string inside quotes and transforms non-printable characters to their Unicode values (\u1234).</p> <p>To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality. Note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <p>Output examples:</p> <pre class="cpp"> <span class="type"><a href="qstring.html">QString</a></span> s; s <span class="operator">=</span> <span class="string">"a"</span>; <a href="qtglobal.html#qDebugx">qDebug</a>()<span class="operator">.</span>noquote() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: a</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "a"</span> s <span class="operator">=</span> <span class="string">"\"a\r\n\""</span>; <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "\"a\r\n\""</span> s <span class="operator">=</span> <span class="string">"\033"</span>; <span class="comment">// escape character</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "\u001B"</span> s <span class="operator">=</span> <span class="string">"\u00AD"</span>; <span class="comment">// SOFT HYPHEN</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "\u00AD"</span> s <span class="operator">=</span> <span class="string">"\u00E1"</span>; <span class="comment">// LATIN SMALL LETTER A WITH ACUTE</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "á"</span> s <span class="operator">=</span> <span class="string">"a\u0301"</span>; <span class="comment">// "a" followed by COMBINING ACUTE ACCENT</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "á";</span> s <span class="operator">=</span> <span class="string">"\u0430\u0301"</span>; <span class="comment">// CYRILLIC SMALL LETTER A followed by COMBINING ACUTE ACCENT</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> s; <span class="comment">// prints: "а́"</span> </pre> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<constQStringRef& --> <h3 class="fn" id="operator-lt-lt-17"><a name="operator-lt-lt-17"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(const <span class="type"><a href="qstringref.html">QStringRef</a></span> &<i>t</i>)</h3> <p>Writes the string, <i>t</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints the string inside quotes and transforms non-printable characters to their Unicode values (\u1234).</p> <p>To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality. Note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <p>See the <a href="qstring.html">QString</a> overload for examples.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QStringView --> <h3 class="fn" id="operator-lt-lt-18"><a name="operator-lt-lt-18"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type"><a href="qstringview.html">QStringView</a></span> <i>s</i>)</h3> <p>Writes the string view, <i>s</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints the string inside quotes and transforms non-printable characters to their Unicode values (\u1234).</p> <p>To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality. Note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <p>See the <a href="qstring.html">QString</a> overload for examples.</p> <p>This function was introduced in Qt 5.10.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QLatin1String --> <h3 class="fn" id="operator-lt-lt-19"><a name="operator-lt-lt-19"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>t</i>)</h3> <p>Writes the string, <i>t</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints the string inside quotes and transforms non-printable characters to their Unicode values (\u1234).</p> <p>To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality. Note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <p>See the <a href="qstring.html">QString</a> overload for examples.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<constQByteArray& --> <h3 class="fn" id="operator-lt-lt-20"><a name="operator-lt-lt-20"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>t</i>)</h3> <p>Writes the byte array, <i>t</i>, to the stream and returns a reference to the stream. Normally, <a href="qdebug.html">QDebug</a> prints the array inside quotes and transforms control or non-US-ASCII characters to their C escape sequences (\xAB). This way, the output is always 7-bit clean and the string can be copied from the output and pasted back into C++ sources, if necessary.</p> <p>To print non-printable characters without transformation, enable the <a href="qdebug.html#noquote">noquote</a>() functionality. Note that some <a href="qdebug.html">QDebug</a> backends might not be 8-bit clean.</p> <p>Output examples:</p> <pre class="cpp"> <span class="type"><a href="qbytearray.html">QByteArray</a></span> ba; ba <span class="operator">=</span> <span class="string">"a"</span>; <a href="qtglobal.html#qDebugx">qDebug</a>()<span class="operator">.</span>noquote() <span class="operator"><</span><span class="operator"><</span> ba; <span class="comment">// prints: a</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> ba; <span class="comment">// prints: "a"</span> ba <span class="operator">=</span> <span class="string">"\"a\r\n\""</span>; <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> ba; <span class="comment">// prints: "\"a\r\n\""</span> ba <span class="operator">=</span> <span class="string">"\033"</span>; <span class="comment">// escape character</span> <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> ba; <span class="comment">// prints: "\x1B"</span> ba <span class="operator">=</span> <span class="string">"\xC3\xA1"</span>; <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> ba; <span class="comment">// prints: "\xC3\xA1"</span> ba <span class="operator">=</span> <span class="type"><a href="qbytearray.html">QByteArray</a></span>(<span class="string">"a\0b"</span><span class="operator">,</span> <span class="number">3</span>); <a href="qtglobal.html#qDebugx">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> ba <span class="comment">// prints: "\a\x00""b"</span> </pre> <p>Note how <a href="qdebug.html">QDebug</a> needed to close and reopen the string in the way C and C++ languages concatenate string literals so that the letter 'b' is not interpreted as part of the previous hexadecimal escape sequence.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<constvoid* --> <h3 class="fn" id="operator-lt-lt-21"><a name="operator-lt-lt-21"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator<<</span>(const <span class="type">void</span> *<i>t</i>)</h3> <p>Writes a pointer, <i>t</i>, to the stream and returns a reference to the stream.</p> <!-- @@@operator<< --> <!-- $$$operator=[overload1]$$$operator=constQDebug& --> <h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &QDebug::<span class="name">operator=</span>(const <span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> &<i>other</i>)</h3> <p>Assigns the <i>other</i> debug stream to this stream and returns a reference to this stream.</p> <!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> <!-- $$$operator<<$$$operator<<QDebugconstQList<T>& --> <h3 class="fn" id="operator-lt-lt-25"><a name="operator-lt-lt-25"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qlist.html">QList</a></span><<span class="type">T</span>> &<i>list</i>)</h3> <p>Writes the contents of <i>list</i> to <i>debug</i>. <code>T</code> needs to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconststd::list<T,Alloc>& --> <h3 class="fn" id="operator-lt-lt-26"><a name="operator-lt-lt-26"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type">std::list</span><<span class="type">T</span>, <span class="type">Alloc</span>> &<i>vec</i>)</h3> <p>Writes the contents of list <i>vec</i> to <i>debug</i>. <code>T</code> needs to support streaming into <a href="qdebug.html">QDebug</a>.</p> <p>This function was introduced in Qt 5.7.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQVector<T>& --> <h3 class="fn" id="operator-lt-lt-27"><a name="operator-lt-lt-27"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qvector.html">QVector</a></span><<span class="type">T</span>> &<i>vec</i>)</h3> <p>Writes the contents of vector <i>vec</i> to <i>debug</i>. <code>T</code> needs to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconststd::vector<T,Alloc>& --> <h3 class="fn" id="operator-lt-lt-28"><a name="operator-lt-lt-28"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type">std::vector</span><<span class="type">T</span>, <span class="type">Alloc</span>> &<i>vec</i>)</h3> <p>Writes the contents of vector <i>vec</i> to <i>debug</i>. <code>T</code> needs to support streaming into <a href="qdebug.html">QDebug</a>.</p> <p>This function was introduced in Qt 5.7.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQSet<T>& --> <h3 class="fn" id="operator-lt-lt-29"><a name="operator-lt-lt-29"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qset.html">QSet</a></span><<span class="type">T</span>> &<i>set</i>)</h3> <p>Writes the contents of <i>set</i> to <i>debug</i>. <code>T</code> needs to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQMap<Key,T>& --> <h3 class="fn" id="operator-lt-lt-30"><a name="operator-lt-lt-30"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qmap.html">QMap</a></span><<span class="type">Key</span>, <span class="type">T</span>> &<i>map</i>)</h3> <p>Writes the contents of <i>map</i> to <i>debug</i>. Both <code>Key</code> and <code>T</code> need to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconststd::map<Key,T,Compare,Alloc>& --> <h3 class="fn" id="operator-lt-lt-31"><a name="operator-lt-lt-31"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type">std::map</span><<span class="type">Key</span>, <span class="type">T</span>, <span class="type">Compare</span>, <span class="type">Alloc</span>> &<i>map</i>)</h3> <p>Writes the contents of <i>map</i> to <i>debug</i>. Both <code>Key</code> and <code>T</code> need to support streaming into <a href="qdebug.html">QDebug</a>.</p> <p>This function was introduced in Qt 5.7.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconststd::multimap<Key,T,Compare,Alloc>& --> <h3 class="fn" id="operator-lt-lt-32"><a name="operator-lt-lt-32"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type">std::multimap</span><<span class="type">Key</span>, <span class="type">T</span>, <span class="type">Compare</span>, <span class="type">Alloc</span>> &<i>map</i>)</h3> <p>Writes the contents of <i>map</i> to <i>debug</i>. Both <code>Key</code> and <code>T</code> need to support streaming into <a href="qdebug.html">QDebug</a>.</p> <p>This function was introduced in Qt 5.7.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQHash<Key,T>& --> <h3 class="fn" id="operator-lt-lt-33"><a name="operator-lt-lt-33"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qhash.html">QHash</a></span><<span class="type">Key</span>, <span class="type">T</span>> &<i>hash</i>)</h3> <p>Writes the contents of <i>hash</i> to <i>debug</i>. Both <code>Key</code> and <code>T</code> need to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQPair<T1,T2>& --> <h3 class="fn" id="operator-lt-lt-34"><a name="operator-lt-lt-34"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qpair.html">QPair</a></span><<span class="type">T1</span>, <span class="type">T2</span>> &<i>pair</i>)</h3> <p>Writes the contents of <i>pair</i> to <i>debug</i>. Both <code>T1</code> and <code>T2</code> need to support streaming into <a href="qdebug.html">QDebug</a>.</p> <!-- @@@operator<< --> <!-- $$$operator<<$$$operator<<QDebugconstQFlags<T>& --> <h3 class="fn" id="operator-lt-lt-35"><a name="operator-lt-lt-35"></a><span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <span class="name">operator<<</span>(<span class="type"><a href="qdebug.html#QDebug">QDebug</a></span> <i>debug</i>, const <span class="type"><a href="qflags.html">QFlags</a></span><<span class="type">T</span>> &<i>flags</i>)</h3> <p>Writes <i>flags</i> to <i>debug</i>.</p> <p>This function was introduced in Qt 4.7.</p> <!-- @@@operator<< --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>