Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 814

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qglobal.cpp -->
  <title>&lt;QtGlobal&gt; - Global Qt Declarations | Qt Core 5.9</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.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td >&lt;QtGlobal&gt; - Global Qt Declarations</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</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="#types">Types</a></li>
<li class="level1"><a href="#functions">Functions</a></li>
<li class="level1"><a href="#macros">Macros</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">&lt;QtGlobal&gt; - Global Qt Declarations</h1>
<span class="subtitle"></span>
<!-- $$$<QtGlobal>-brief -->
<p>The &lt;QtGlobal&gt; header file includes the fundamental global declarations. It is included by most other Qt header files. <a href="#details">More...</a></p>
<!-- @@@<QtGlobal> -->
<ul>
<li><a href="qtglobal-obsolete.html">Obsolete members</a></li>
</ul>
<a name="Types"></a>
<h2 id="Types">Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QFunctionPointer-typedef">QFunctionPointer</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></b> { QtDebugMsg, QtInfoMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg }</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qint8-typedef">qint8</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qint16-typedef">qint16</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qint32-typedef">qint32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qint64-typedef">qint64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qintptr-typedef">qintptr</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qlonglong-typedef">qlonglong</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qptrdiff-typedef">qptrdiff</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qreal-typedef">qreal</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#quint8-typedef">quint8</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#quint16-typedef">quint16</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#quint32-typedef">quint32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#quint64-typedef">quint64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#quintptr-typedef">quintptr</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qulonglong-typedef">qulonglong</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#uchar-typedef">uchar</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#uint-typedef">uint</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#ulong-typedef">ulong</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#ushort-typedef">ushort</a></b></td></tr>
</table></div>
<a name="Functions"></a>
<h2 id="Functions">Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qAbsx">qAbs</a></b>(const T &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QtPrivate::QAddConst&lt;T&gt;::Type &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qAsConst">qAsConst</a></b>(T &amp;<i>t</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const T &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qBound">qBound</a></b>(const T &amp;<i>min</i>, const T &amp;<i>value</i>, const T &amp;<i>max</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> auto </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qConstOverload">qConstOverload</a></b>(T <i>memberFunctionPointer</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qEnvironmentVariableIntValue">qEnvironmentVariableIntValue</a></b>(const char *<i>varName</i>, bool *<i>ok</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qEnvironmentVariableIsEmpty">qEnvironmentVariableIsEmpty</a></b>(const char *<i>varName</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qEnvironmentVariableIsSet">qEnvironmentVariableIsSet</a></b>(const char *<i>varName</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> quint32 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFloatDistance">qFloatDistance</a></b>(float <i>a</i>, float <i>b</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> quint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFloatDistance-1">qFloatDistance</a></b>(double <i>a</i>, double <i>b</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFormatLogMessage">qFormatLogMessage</a></b>(QtMsgType <i>type</i>, const QMessageLogContext &amp;<i>context</i>, const QString &amp;<i>str</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFuzzyCompare">qFuzzyCompare</a></b>(double <i>p1</i>, double <i>p2</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFuzzyCompare-1">qFuzzyCompare</a></b>(float <i>p1</i>, float <i>p2</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFuzzyIsNull">qFuzzyIsNull</a></b>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFuzzyIsNull-1">qFuzzyIsNull</a></b>(float <i>f</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qInf">qInf</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QtMessageHandler </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a></b>(QtMessageHandler <i>handler</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsFinite">qIsFinite</a></b>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsFinite-1">qIsFinite</a></b>(float <i>f</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsInf">qIsInf</a></b>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsInf-1">qIsInf</a></b>(float <i>f</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsNaN">qIsNaN</a></b>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qIsNaN-1">qIsNaN</a></b>(float <i>f</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const T &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qMaxx">qMax</a></b>(const T &amp;<i>value1</i>, const T &amp;<i>value2</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const T &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qMinx">qMin</a></b>(const T &amp;<i>value1</i>, const T &amp;<i>value2</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> auto </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qNonConstOverload">qNonConstOverload</a></b>(T <i>memberFunctionPointer</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> auto </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qOverload">qOverload</a></b>(T <i>functionPointer</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qQNaN">qQNaN</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qRound64">qRound64</a></b>(double <i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qRound64-1">qRound64</a></b>(float <i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qRound">qRound</a></b>(double <i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qRound-1">qRound</a></b>(float <i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qSNaN">qSNaN</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qSetMessagePattern">qSetMessagePattern</a></b>(const QString &amp;<i>pattern</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T *</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#q_check_ptr">q_check_ptr</a></b>(T *<i>pointer</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qgetenv">qgetenv</a></b>(const char *<i>varName</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qputenv">qputenv</a></b>(const char *<i>varName</i>, const QByteArray &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qrand">qrand</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qsrand">qsrand</a></b>(uint <i>seed</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qtTrId">qtTrId</a></b>(const char *<i>id</i>, int <i>n</i> = -1)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qunsetenv">qunsetenv</a></b>(const char *<i>varName</i>)</td></tr>
</table></div>
<a name="Macros"></a>
<h2 id="Macros">Macros</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_DEPRECATED_WARNINGS">QT_DEPRECATED_WARNINGS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_DISABLE_DEPRECATED_BEFORE">QT_DISABLE_DEPRECATED_BEFORE</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_POINTER_SIZE">QT_POINTER_SIZE</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_REQUIRE_VERSION">QT_REQUIRE_VERSION</a></b>(int <i>argc</i>, char **<i>argv</i>, const char *<i>version</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_TRANSLATE_NOOP3">QT_TRANSLATE_NOOP3</a></b>(<i>context</i>, <i>sourceText</i>, <i>comment</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a></b>(<i>context</i>, <i>sourceText</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_TRID_NOOP">QT_TRID_NOOP</a></b>(<i>id</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_TR_NOOP">QT_TR_NOOP</a></b>(<i>sourceText</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_VERSION">QT_VERSION</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_VERSION_CHECK">QT_VERSION_CHECK</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_VERSION_STR">QT_VERSION_STR</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a></b>(bool <i>test</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_ASSERT_X">Q_ASSERT_X</a></b>(bool <i>test</i>, const char *<i>where</i>, const char *<i>what</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_ASSUME">Q_ASSUME</a></b>(bool <i>expr</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_BIG_ENDIAN">Q_BIG_ENDIAN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_BYTE_ORDER">Q_BYTE_ORDER</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_BOR">Q_CC_BOR</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_CDS">Q_CC_CDS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_CLANG">Q_CC_CLANG</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_COMEAU">Q_CC_COMEAU</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_DEC">Q_CC_DEC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_EDG">Q_CC_EDG</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_GHS">Q_CC_GHS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_GNU">Q_CC_GNU</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_HIGHC">Q_CC_HIGHC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_HPACC">Q_CC_HPACC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_INTEL">Q_CC_INTEL</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_KAI">Q_CC_KAI</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_MIPS">Q_CC_MIPS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_MSVC">Q_CC_MSVC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_OC">Q_CC_OC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_PGI">Q_CC_PGI</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_SUN">Q_CC_SUN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_SYM">Q_CC_SYM</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_USLC">Q_CC_USLC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CC_WAT">Q_CC_WAT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_CHECK_PTRx">Q_CHECK_PTR</a></b>(void *<i>pointer</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECLARE_TYPEINFO">Q_DECLARE_TYPEINFO</a></b>(<i>Type</i>, <i>Flags</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_CONSTEXPR">Q_DECL_CONSTEXPR</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_EXPORT">Q_DECL_EXPORT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_FINAL">Q_DECL_FINAL</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_IMPORT">Q_DECL_IMPORT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_NOEXCEPT">Q_DECL_NOEXCEPT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_NOEXCEPT_EXPR">Q_DECL_NOEXCEPT_EXPR</a></b>(<i>x</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_NOTHROW">Q_DECL_NOTHROW</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_OVERRIDE">Q_DECL_OVERRIDE</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_DECL_RELAXED_CONSTEXPR">Q_DECL_RELAXED_CONSTEXPR</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FALLTHROUGH">Q_FALLTHROUGH</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FOREACH">Q_FOREACH</a></b>(<i>variable</i>, <i>container</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FOREVER">Q_FOREVER</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FORWARD_DECLARE_CF_TYPE">Q_FORWARD_DECLARE_CF_TYPE</a></b>(<i>type</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FORWARD_DECLARE_MUTABLE_CF_TYPE">Q_FORWARD_DECLARE_MUTABLE_CF_TYPE</a></b>(<i>type</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FORWARD_DECLARE_OBJC_CLASS">Q_FORWARD_DECLARE_OBJC_CLASS</a></b>(<i>classname</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_FUNC_INFO">Q_FUNC_INFO</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a></b>(<i>literal</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_LIKELY">Q_LIKELY</a></b>(<i>expr</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_LITTLE_ENDIAN">Q_LITTLE_ENDIAN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_AIX">Q_OS_AIX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_ANDROID">Q_OS_ANDROID</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_BSD4">Q_OS_BSD4</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_BSDI">Q_OS_BSDI</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_CYGWIN">Q_OS_CYGWIN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_DARWIN">Q_OS_DARWIN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_DGUX">Q_OS_DGUX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_DYNIX">Q_OS_DYNIX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_FREEBSD">Q_OS_FREEBSD</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_HPUX">Q_OS_HPUX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_HURD">Q_OS_HURD</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_IOS">Q_OS_IOS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_IRIX">Q_OS_IRIX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_LINUX">Q_OS_LINUX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_LYNX">Q_OS_LYNX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_MAC">Q_OS_MAC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_MACOS">Q_OS_MACOS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_NETBSD">Q_OS_NETBSD</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_OPENBSD">Q_OS_OPENBSD</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_OSF">Q_OS_OSF</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_OSX">Q_OS_OSX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_QNX">Q_OS_QNX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_RELIANT">Q_OS_RELIANT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_SCO">Q_OS_SCO</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_SOLARIS">Q_OS_SOLARIS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_TVOS">Q_OS_TVOS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_ULTRIX">Q_OS_ULTRIX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_UNIX">Q_OS_UNIX</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_UNIXWARE">Q_OS_UNIXWARE</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_WATCHOS">Q_OS_WATCHOS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_WIN32">Q_OS_WIN32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_WIN64">Q_OS_WIN64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_WIN">Q_OS_WIN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_OS_WINRT">Q_OS_WINRT</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_X86">Q_PROCESSOR_X86</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_S390">Q_PROCESSOR_S390</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_ALPHA">Q_PROCESSOR_ALPHA</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_ARM">Q_PROCESSOR_ARM</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_ARM_V5">Q_PROCESSOR_ARM_V5</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_ARM_V6">Q_PROCESSOR_ARM_V6</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_ARM_V7">Q_PROCESSOR_ARM_V7</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_AVR32">Q_PROCESSOR_AVR32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_BLACKFIN">Q_PROCESSOR_BLACKFIN</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_IA64">Q_PROCESSOR_IA64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_32">Q_PROCESSOR_MIPS_32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_64">Q_PROCESSOR_MIPS_64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_III">Q_PROCESSOR_MIPS_III</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_IV">Q_PROCESSOR_MIPS_IV</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_MIPS_V">Q_PROCESSOR_MIPS_V</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_POWER">Q_PROCESSOR_POWER</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_POWER_32">Q_PROCESSOR_POWER_32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_POWER_64">Q_PROCESSOR_POWER_64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_S390_X">Q_PROCESSOR_S390_X</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_SH">Q_PROCESSOR_SH</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_SH_4A">Q_PROCESSOR_SH_4A</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_SPARC">Q_PROCESSOR_SPARC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_SPARC_V9">Q_PROCESSOR_SPARC_V9</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_X86_32">Q_PROCESSOR_X86_32</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_PROCESSOR_X86_64">Q_PROCESSOR_X86_64</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> quint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a></b>(<i>literal</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_UNLIKELY">Q_UNLIKELY</a></b>(<i>expr</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_UNREACHABLE">Q_UNREACHABLE</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_UNUSED">Q_UNUSED</a></b>(<i>name</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#foreach">foreach</a></b>(<i>variable</i>, <i>container</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#forever">forever</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qCritical">qCritical</a></b>(const char *<i>message</i>, <i>...</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qDebug">qDebug</a></b>(const char *<i>message</i>, <i>...</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFatal">qFatal</a></b>(const char *<i>message</i>, <i>...</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qInfo">qInfo</a></b>(const char *<i>message</i>, <i>...</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qMove">qMove</a></b>(<i>x</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qPrintable">qPrintable</a></b>(const QString &amp;<i>str</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const wchar_t *</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qUtf16Printable">qUtf16Printable</a></b>(const QString &amp;<i>str</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qUtf8Printable">qUtf8Printable</a></b>(const QString &amp;<i>str</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qWarning">qWarning</a></b>(const char *<i>message</i>, <i>...</i>)</td></tr>
</table></div>
<!-- $$$<QtGlobal>-description -->
<div class="descr"> <a name="details"></a>
<p>The global declarations include <a href="qtglobal.html#types">types</a>, <a href="qtglobal.html#functions">functions</a> and <a href="qtglobal.html#macros">macros</a>.</p>
<p>The type definitions are partly convenience definitions for basic types (some of which guarantee certain bit-sizes on all platforms supported by Qt), partly types related to Qt message handling. The functions are related to generating messages, Qt version handling and comparing and adjusting object values. And finally, some of the declared macros enable programmers to add compiler or platform specific code to their applications, while others are convenience macros for larger operations.</p>
<a name="types"></a>
<h2 id="types">Types</h2>
<p>The header file declares several type definitions that guarantee a specified bit-size on all platforms supported by Qt for various basic types, for example <a href="qtglobal.html#qint8-typedef">qint8</a> which is a signed char guaranteed to be 8-bit on all platforms supported by Qt. The header file also declares the <a href="qtglobal.html#qlonglong-typedef">qlonglong</a> type definition for <code>long long int</code> (<code>__int64</code> on Windows).</p>
<p>Several convenience type definitions are declared: <a href="qtglobal.html#qreal-typedef">qreal</a> for <code>double</code>, <a href="qtglobal.html#uchar-typedef">uchar</a> for <code>unsigned</code> char, <a href="qtglobal.html#uint-typedef">uint</a> for <code>unsigned</code> int, <a href="qtglobal.html#ulong-typedef">ulong</a> for <code>unsigned</code> long and <a href="qtglobal.html#ushort-typedef">ushort</a> for <code>unsigned</code> short.</p>
<p>Finally, the <a href="qtglobal.html#QtMsgType-enum">QtMsgType</a> definition identifies the various messages that can be generated and sent to a Qt message handler; <a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a> is a type definition for a pointer to a function with the signature <code>void myMessageHandler(QtMsgType, const QMessageLogContext &amp;, const char *)</code>. <a href="qmessagelogcontext.html">QMessageLogContext</a> class contains the line, file, and function the message was logged at. This information is created by the <a href="qmessagelogger.html">QMessageLogger</a> class.</p>
<a name="functions"></a>
<h2 id="functions">Functions</h2>
<p>The &lt;QtGlobal&gt; header file contains several functions comparing and adjusting an object's value. These functions take a template type as argument: You can retrieve the absolute value of an object using the <a href="qtglobal.html#qAbsx">qAbs</a>() function, and you can bound a given object's value by given minimum and maximum values using the <a href="qtglobal.html#qBound">qBound</a>() function. You can retrieve the minimum and maximum of two given objects using <a href="qtglobal.html#qMinx">qMin</a>() and <a href="qtglobal.html#qMaxx">qMax</a>() respectively. All these functions return a corresponding template type; the template types can be replaced by any other type.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> myValue <span class="operator">=</span> <span class="number">10</span>;
  <span class="type">int</span> minValue <span class="operator">=</span> <span class="number">2</span>;
  <span class="type">int</span> maxValue <span class="operator">=</span> <span class="number">6</span>;

  <span class="type">int</span> boundedValue <span class="operator">=</span> <a href="qtglobal.html#qBound">qBound</a>(minValue<span class="operator">,</span> myValue<span class="operator">,</span> maxValue);
  <span class="comment">// boundedValue == 6</span>

</pre>
<p>&lt;QtGlobal&gt; also contains functions that generate messages from the given string argument: <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), and <a href="qtglobal.html#qFatal">qFatal</a>(). These functions call the message handler with the given message.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="keyword">if</span> (<span class="operator">!</span>driver()<span class="operator">-</span><span class="operator">&gt;</span>isOpen() <span class="operator">|</span><span class="operator">|</span> driver()<span class="operator">-</span><span class="operator">&gt;</span>isOpenError()) {
      <a href="qtglobal.html#qWarning">qWarning</a>(<span class="string">&quot;QSqlQuery::exec: database not open&quot;</span>);
      <span class="keyword">return</span> <span class="keyword">false</span>;
  }

</pre>
<p>The remaining functions are <a href="qtglobal.html#qRound">qRound</a>() and <a href="qtglobal.html#qRound64">qRound64</a>(), which both accept a <code>double</code> or <code>float</code> value as their argument returning the value rounded up to the nearest integer and 64-bit integer respectively, the <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>() function which installs the given <a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a>, and the qVersion() function which returns the version number of Qt at run-time as a string.</p>
<a name="macros"></a>
<h2 id="macros">Macros</h2>
<p>The &lt;QtGlobal&gt; header file provides a range of macros (Q_CC_*) that are defined if the application is compiled using the specified platforms. For example, the <a href="qtglobal.html#Q_CC_SUN">Q_CC_SUN</a> macro is defined if the application is compiled using Forte Developer, or Sun Studio C++. The header file also declares a range of macros (Q_OS_*) that are defined for the specified platforms. For example, <a href="qtglobal.html#Q_OS_UNIX">Q_OS_UNIX</a> which is defined for the Unix-based systems.</p>
<p>The purpose of these macros is to enable programmers to add compiler or platform specific code to their application.</p>
<p>The remaining macros are convenience macros for larger operations: The <a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() and <a href="qtglobal.html#QT_TR_NOOP">QT_TR_NOOP</a>() macros provide the possibility of marking text for dynamic translation, i.e&#x2e; translation without changing the stored source text. The <a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a>() and <a href="qtglobal.html#Q_ASSERT_X">Q_ASSERT_X</a>() enables warning messages of various level of refinement. The <a href="qtglobal.html#Q_FOREACH">Q_FOREACH</a>() and <a href="qtglobal.html#foreach">foreach</a>() macros implement Qt's foreach loop.</p>
<p>The <a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a>() and <a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a>() macros wrap signed and unsigned 64-bit integer literals in a platform-independent way. The <a href="qtglobal.html#Q_CHECK_PTRx">Q_CHECK_PTR</a>() macro prints a warning containing the source code's file name and line number, saying that the program ran out of memory, if the pointer is 0. The <a href="qtglobal.html#qPrintable">qPrintable</a>() and <a href="qtglobal.html#qUtf8Printable">qUtf8Printable</a>() macros represent an easy way of printing text.</p>
<p>Finally, the <a href="qtglobal.html#QT_POINTER_SIZE">QT_POINTER_SIZE</a> macro expands to the size of a pointer in bytes, and the <a href="qtglobal.html#QT_VERSION">QT_VERSION</a> and <a href="qtglobal.html#QT_VERSION_STR">QT_VERSION_STR</a> macros expand to a numeric value or a string, respectively, specifying Qt's version number, i.e the version the application is compiled against.</p>
</div>
<p><b>See also </b><a href="qtalgorithms.html">&lt;QtAlgorithms&gt;</a> and <a href="qsysinfo.html">QSysInfo</a>.</p>
<!-- @@@<QtGlobal> -->
<h2>Type Documentation</h2>
<!-- $$$QFunctionPointer -->
<h3 class="fn" id="QFunctionPointer-typedef"><a name="QFunctionPointer-typedef"></a>typedef <span class="name">QFunctionPointer</span></h3>
<p>This is a typedef for <code>void (*)()</code>, a pointer to a function that takes no arguments and returns void.</p>
<!-- @@@QFunctionPointer -->
<!-- $$$QtMessageHandler -->
<h3 class="fn" id="QtMessageHandler-typedef"><a name="QtMessageHandler-typedef"></a>typedef <span class="name">QtMessageHandler</span></h3>
<p>This is a typedef for a pointer to a function with the following signature:</p>
<pre class="cpp">

  <span class="type">void</span> myMessageHandler(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span><span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qmessagelogcontext.html">QMessageLogContext</a></span> <span class="operator">&amp;</span><span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&amp;</span>);

</pre>
<p>This typedef was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a> and <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<!-- @@@QtMessageHandler -->
<!-- $$$QtMsgType$$$QtDebugMsg$$$QtWarningMsg$$$QtCriticalMsg$$$QtFatalMsg$$$QtInfoMsg$$$QtSystemMsg -->
<h3 class="fn" id="QtMsgType-enum"><a name="QtMsgType-enum"></a>enum <span class="name">QtMsgType</span></h3>
<p>This enum describes the messages that can be sent to a message handler (<a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a>). You can use the enum to identify and associate the various message types with the appropriate actions.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QtDebugMsg</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qDebug">qDebug</a>() function.</td></tr>
<tr><td class="topAlign"><code>QtInfoMsg</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qInfo">qInfo</a>() function.</td></tr>
<tr><td class="topAlign"><code>QtWarningMsg</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qWarning">qWarning</a>() function.</td></tr>
<tr><td class="topAlign"><code>QtCriticalMsg</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qCritical">qCritical</a>() function.</td></tr>
<tr><td class="topAlign"><code>QtFatalMsg</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qFatal">qFatal</a>() function.</td></tr>
<tr><td class="topAlign"><code>QtSystemMsg</code></td><td class="topAlign tblval"><code>QtCriticalMsg</code></td><td class="topAlign">&nbsp;</td></tr>
</table></div>
<p><code>QtInfoMsg</code> was added in Qt 5.5&#x2e;</p>
<p><b>See also </b><a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a> and <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<!-- @@@QtMsgType -->
<!-- $$$qint8 -->
<h3 class="fn" id="qint8-typedef"><a name="qint8-typedef"></a>typedef <span class="name">qint8</span></h3>
<p>Typedef for <code>signed char</code>. This type is guaranteed to be 8-bit on all platforms supported by Qt.</p>
<!-- @@@qint8 -->
<!-- $$$qint16 -->
<h3 class="fn" id="qint16-typedef"><a name="qint16-typedef"></a>typedef <span class="name">qint16</span></h3>
<p>Typedef for <code>signed short</code>. This type is guaranteed to be 16-bit on all platforms supported by Qt.</p>
<!-- @@@qint16 -->
<!-- $$$qint32 -->
<h3 class="fn" id="qint32-typedef"><a name="qint32-typedef"></a>typedef <span class="name">qint32</span></h3>
<p>Typedef for <code>signed int</code>. This type is guaranteed to be 32-bit on all platforms supported by Qt.</p>
<!-- @@@qint32 -->
<!-- $$$qint64 -->
<h3 class="fn" id="qint64-typedef"><a name="qint64-typedef"></a>typedef <span class="name">qint64</span></h3>
<p>Typedef for <code>long long int</code> (<code>__int64</code> on Windows). This type is guaranteed to be 64-bit on all platforms supported by Qt.</p>
<p>Literals of this type can be created using the <a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a>() macro:</p>
<pre class="cpp">

  <span class="type">qint64</span> value <span class="operator">=</span> Q_INT64_C(<span class="number">932838457459459</span>);

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a>(), <a href="qtglobal.html#quint64-typedef">quint64</a>, and <a href="qtglobal.html#qlonglong-typedef">qlonglong</a>.</p>
<!-- @@@qint64 -->
<!-- $$$qintptr -->
<h3 class="fn" id="qintptr-typedef"><a name="qintptr-typedef"></a>typedef <span class="name">qintptr</span></h3>
<p>Integral type for representing pointers in a signed integer (useful for hashing, etc.)&#x2e;</p>
<p>Typedef for either qint32 or qint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, qintptr is a typedef for qint32; on a system with 64-bit pointers, qintptr is a typedef for qint64.</p>
<p>Note that qintptr is signed. Use quintptr for unsigned values.</p>
<p><b>See also </b><a href="qtglobal.html#qptrdiff-typedef">qptrdiff</a>, <a href="qtglobal.html#qint32-typedef">qint32</a>, and <a href="qtglobal.html#qint64-typedef">qint64</a>.</p>
<!-- @@@qintptr -->
<!-- $$$qlonglong -->
<h3 class="fn" id="qlonglong-typedef"><a name="qlonglong-typedef"></a>typedef <span class="name">qlonglong</span></h3>
<p>Typedef for <code>long long int</code> (<code>__int64</code> on Windows). This is the same as <a href="qtglobal.html#qint64-typedef">qint64</a>.</p>
<p><b>See also </b><a href="qtglobal.html#qulonglong-typedef">qulonglong</a> and <a href="qtglobal.html#qint64-typedef">qint64</a>.</p>
<!-- @@@qlonglong -->
<!-- $$$qptrdiff -->
<h3 class="fn" id="qptrdiff-typedef"><a name="qptrdiff-typedef"></a>typedef <span class="name">qptrdiff</span></h3>
<p>Integral type for representing pointer differences.</p>
<p>Typedef for either qint32 or qint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, quintptr is a typedef for quint32; on a system with 64-bit pointers, quintptr is a typedef for quint64.</p>
<p>Note that qptrdiff is signed. Use quintptr for unsigned values.</p>
<p><b>See also </b><a href="qtglobal.html#quintptr-typedef">quintptr</a>, <a href="qtglobal.html#qint32-typedef">qint32</a>, and <a href="qtglobal.html#qint64-typedef">qint64</a>.</p>
<!-- @@@qptrdiff -->
<!-- $$$qreal -->
<h3 class="fn" id="qreal-typedef"><a name="qreal-typedef"></a>typedef <span class="name">qreal</span></h3>
<p>Typedef for <code>double</code> unless Qt is configured with the <code>-qreal float</code> option.</p>
<!-- @@@qreal -->
<!-- $$$quint8 -->
<h3 class="fn" id="quint8-typedef"><a name="quint8-typedef"></a>typedef <span class="name">quint8</span></h3>
<p>Typedef for <code>unsigned char</code>. This type is guaranteed to be 8-bit on all platforms supported by Qt.</p>
<!-- @@@quint8 -->
<!-- $$$quint16 -->
<h3 class="fn" id="quint16-typedef"><a name="quint16-typedef"></a>typedef <span class="name">quint16</span></h3>
<p>Typedef for <code>unsigned short</code>. This type is guaranteed to be 16-bit on all platforms supported by Qt.</p>
<!-- @@@quint16 -->
<!-- $$$quint32 -->
<h3 class="fn" id="quint32-typedef"><a name="quint32-typedef"></a>typedef <span class="name">quint32</span></h3>
<p>Typedef for <code>unsigned int</code>. This type is guaranteed to be 32-bit on all platforms supported by Qt.</p>
<!-- @@@quint32 -->
<!-- $$$quint64 -->
<h3 class="fn" id="quint64-typedef"><a name="quint64-typedef"></a>typedef <span class="name">quint64</span></h3>
<p>Typedef for <code>unsigned long long int</code> (<code>unsigned __int64</code> on Windows). This type is guaranteed to be 64-bit on all platforms supported by Qt.</p>
<p>Literals of this type can be created using the <a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a>() macro:</p>
<pre class="cpp">

  <span class="type">quint64</span> value <span class="operator">=</span> Q_UINT64_C(<span class="number">932838457459459</span>);

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a>(), <a href="qtglobal.html#qint64-typedef">qint64</a>, and <a href="qtglobal.html#qulonglong-typedef">qulonglong</a>.</p>
<!-- @@@quint64 -->
<!-- $$$quintptr -->
<h3 class="fn" id="quintptr-typedef"><a name="quintptr-typedef"></a>typedef <span class="name">quintptr</span></h3>
<p>Integral type for representing pointers in an unsigned integer (useful for hashing, etc.)&#x2e;</p>
<p>Typedef for either quint32 or quint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, quintptr is a typedef for quint32; on a system with 64-bit pointers, quintptr is a typedef for quint64.</p>
<p>Note that quintptr is unsigned. Use qptrdiff for signed values.</p>
<p><b>See also </b><a href="qtglobal.html#qptrdiff-typedef">qptrdiff</a>, <a href="qtglobal.html#quint32-typedef">quint32</a>, and <a href="qtglobal.html#quint64-typedef">quint64</a>.</p>
<!-- @@@quintptr -->
<!-- $$$qulonglong -->
<h3 class="fn" id="qulonglong-typedef"><a name="qulonglong-typedef"></a>typedef <span class="name">qulonglong</span></h3>
<p>Typedef for <code>unsigned long long int</code> (<code>unsigned __int64</code> on Windows). This is the same as <a href="qtglobal.html#quint64-typedef">quint64</a>.</p>
<p><b>See also </b><a href="qtglobal.html#quint64-typedef">quint64</a> and <a href="qtglobal.html#qlonglong-typedef">qlonglong</a>.</p>
<!-- @@@qulonglong -->
<!-- $$$uchar -->
<h3 class="fn" id="uchar-typedef"><a name="uchar-typedef"></a>typedef <span class="name">uchar</span></h3>
<p>Convenience typedef for <code>unsigned char</code>.</p>
<!-- @@@uchar -->
<!-- $$$uint -->
<h3 class="fn" id="uint-typedef"><a name="uint-typedef"></a>typedef <span class="name">uint</span></h3>
<p>Convenience typedef for <code>unsigned int</code>.</p>
<!-- @@@uint -->
<!-- $$$ulong -->
<h3 class="fn" id="ulong-typedef"><a name="ulong-typedef"></a>typedef <span class="name">ulong</span></h3>
<p>Convenience typedef for <code>unsigned long</code>.</p>
<!-- @@@ulong -->
<!-- $$$ushort -->
<h3 class="fn" id="ushort-typedef"><a name="ushort-typedef"></a>typedef <span class="name">ushort</span></h3>
<p>Convenience typedef for <code>unsigned short</code>.</p>
<!-- @@@ushort -->
<h2>Function Documentation</h2>
<!-- $$$qAbs[overload1]$$$qAbsconstT& -->
<h3 class="fn" id="qAbsx"><a name="qAbsx"></a><span class="type">T</span> <span class="name">qAbs</span>(const <span class="type">T</span> &amp;<i>value</i>)</h3>
<p>Compares <i>value</i> to the 0 of type T and returns the absolute value. Thus if T is <i>double</i>, then <i>value</i> is compared to <i>(double) 0</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> absoluteValue;
  <span class="type">int</span> myValue <span class="operator">=</span> <span class="operator">-</span><span class="number">4</span>;

  absoluteValue <span class="operator">=</span> qAbs(myValue);
  <span class="comment">// absoluteValue == 4</span>

</pre>
<!-- @@@qAbs -->
<!-- $$$qAsConst[overload1]$$$qAsConstT& -->
<h3 class="fn" id="qAsConst"><a name="qAsConst"></a><span class="type"><a href="qtprivate-qaddconst.html">QtPrivate::QAddConst</a></span>&lt;<span class="type">T</span>&gt;<span class="type">::Type</span> &amp;<span class="name">qAsConst</span>(<span class="type">T</span> &amp;<i>t</i>)</h3>
<p>Returns <i>t</i> cast to <code>const T</code>.</p>
<p>This function is a Qt implementation of C++17's std::as_const(), a cast function like std::move(). But while std::move() turns lvalues into rvalues, this function turns non-const lvalues into const lvalues. Like std::as_const(), it doesn't work on rvalues, because it cannot be efficiently implemented for rvalues without leaving dangling references.</p>
<p>Its main use in Qt is to prevent implicitly-shared Qt containers from detaching:</p>
<pre class="cpp">

  <span class="type"><a href="qstring.html">QString</a></span> s <span class="operator">=</span> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>;
  <span class="keyword">for</span> (<span class="type"><a href="qchar.html">QChar</a></span> ch : s) <span class="comment">// detaches 's' (performs a deep-copy if 's' was shared)</span>
      process(ch);
  <span class="keyword">for</span> (<span class="type"><a href="qchar.html">QChar</a></span> ch : qAsConst(s)) <span class="comment">// ok, no detach attempt</span>
      process(ch);

</pre>
<p>Of course, in this case, you could (and probably should) have declared <code>s</code> as <code>const</code> in the first place:</p>
<pre class="cpp">

  <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> s <span class="operator">=</span> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>;
  <span class="keyword">for</span> (<span class="type"><a href="qchar.html">QChar</a></span> ch : s) <span class="comment">// ok, no detach attempt on const objects</span>
      process(ch);

</pre>
<p>but often that is not easily possible.</p>
<p>It is important to note that qAsConst() does not copy its argument, it just performs a <code>const_cast&lt;const T&amp;&gt;(t)</code>. This is also the reason why it is designed to fail for rvalues: The returned reference would go stale too soon. So while this works (but detaches the returned object):</p>
<pre class="cpp">

  <span class="keyword">for</span> (<span class="type"><a href="qchar.html">QChar</a></span> ch : funcReturningQString())
      process(ch); <span class="comment">// OK, the returned object is kept alive for the loop's duration</span>

</pre>
<p>this would not:</p>
<pre class="cpp">

  <span class="keyword">for</span> (<span class="type"><a href="qchar.html">QChar</a></span> ch : qAsConst(funcReturningQString()))
      process(ch); <span class="comment">// ERROR: ch is copied from deleted memory</span>

</pre>
<p>To prevent this construct from compiling (and failing at runtime), qAsConst() has a second, deleted, overload which binds to rvalues.</p>
<p>This function was introduced in  Qt 5.7.</p>
<!-- @@@qAsConst -->
<!-- $$$qBound[overload1]$$$qBoundconstT&constT&constT& -->
<h3 class="fn" id="qBound"><a name="qBound"></a>const <span class="type">T</span> &amp;<span class="name">qBound</span>(const <span class="type">T</span> &amp;<i>min</i>, const <span class="type">T</span> &amp;<i>value</i>, const <span class="type">T</span> &amp;<i>max</i>)</h3>
<p>Returns <i>value</i> bounded by <i>min</i> and <i>max</i>. This is equivalent to <a href="qtglobal.html#qMaxx">qMax</a>(<i>min</i>, <a href="qtglobal.html#qMinx">qMin</a>(<i>value</i>, <i>max</i>)).</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> myValue <span class="operator">=</span> <span class="number">10</span>;
  <span class="type">int</span> minValue <span class="operator">=</span> <span class="number">2</span>;
  <span class="type">int</span> maxValue <span class="operator">=</span> <span class="number">6</span>;

  <span class="type">int</span> boundedValue <span class="operator">=</span> qBound(minValue<span class="operator">,</span> myValue<span class="operator">,</span> maxValue);
  <span class="comment">// boundedValue == 6</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#qMinx">qMin</a>() and <a href="qtglobal.html#qMaxx">qMax</a>().</p>
<!-- @@@qBound -->
<!-- $$$qConstOverload[overload1]$$$qConstOverloadT -->
<h3 class="fn" id="qConstOverload"><a name="qConstOverload"></a><span class="type">auto</span> <span class="name">qConstOverload</span>(<span class="type">T</span> <i>memberFunctionPointer</i>)</h3>
<p>Returns the <i>memberFunctionPointer</i> pointer to a constant member function:</p>
<pre class="cpp">

      <span class="keyword">struct</span> Foo {
          <span class="type">void</span> overloadedFunction(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span>);
          <span class="type">void</span> overloadedFunction(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span>) <span class="keyword">const</span>;
      };
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> qConstOverload<span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <a href="qtglobal.html#qNonConstOverload">qNonConstOverload</a><span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)

</pre>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtglobal.html#qOverload">qOverload</a>, <a href="qtglobal.html#qNonConstOverload">qNonConstOverload</a>, and Differences between String-Based and Functor-Based Connections.</p>
<!-- @@@qConstOverload -->
<!-- $$$qEnvironmentVariableIntValue[overload1]$$$qEnvironmentVariableIntValueconstchar*bool* -->
<h3 class="fn" id="qEnvironmentVariableIntValue"><a name="qEnvironmentVariableIntValue"></a><span class="type">int</span> <span class="name">qEnvironmentVariableIntValue</span>(const <span class="type">char</span> *<i>varName</i>, <span class="type">bool</span> *<i>ok</i> = Q_NULLPTR)</h3>
<p>Returns the numerical value of the environment variable <i>varName</i>. If <i>ok</i> is not null, sets <code>*ok</code> to <code>true</code> or <code>false</code> depending on the success of the conversion.</p>
<p>Equivalent to</p>
<pre class="cpp">

  qgetenv(varName)<span class="operator">.</span>toInt(ok<span class="operator">,</span> <span class="number">0</span>)

</pre>
<p>except that it's much faster, and can't throw exceptions.</p>
<p><b>Note: </b>there's a limit on the length of the value, which is sufficient for all valid values of int, not counting leading zeroes or spaces. Values that are too long will either be truncated or this function will set <i>ok</i> to <code>false</code>.</p><p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qtglobal.html#qgetenv">qgetenv</a>() and <a href="qtglobal.html#qEnvironmentVariableIsSet">qEnvironmentVariableIsSet</a>().</p>
<!-- @@@qEnvironmentVariableIntValue -->
<!-- $$$qEnvironmentVariableIsEmpty[overload1]$$$qEnvironmentVariableIsEmptyconstchar* -->
<h3 class="fn" id="qEnvironmentVariableIsEmpty"><a name="qEnvironmentVariableIsEmpty"></a><span class="type">bool</span> <span class="name">qEnvironmentVariableIsEmpty</span>(const <span class="type">char</span> *<i>varName</i>)</h3>
<p>Returns whether the environment variable <i>varName</i> is empty.</p>
<p>Equivalent to</p>
<pre class="cpp">

  qgetenv(varName)<span class="operator">.</span>isEmpty()

</pre>
<p>except that it's potentially much faster, and can't throw exceptions.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qtglobal.html#qgetenv">qgetenv</a>() and <a href="qtglobal.html#qEnvironmentVariableIsSet">qEnvironmentVariableIsSet</a>().</p>
<!-- @@@qEnvironmentVariableIsEmpty -->
<!-- $$$qEnvironmentVariableIsSet[overload1]$$$qEnvironmentVariableIsSetconstchar* -->
<h3 class="fn" id="qEnvironmentVariableIsSet"><a name="qEnvironmentVariableIsSet"></a><span class="type">bool</span> <span class="name">qEnvironmentVariableIsSet</span>(const <span class="type">char</span> *<i>varName</i>)</h3>
<p>Returns whether the environment variable <i>varName</i> is set.</p>
<p>Equivalent to</p>
<pre class="cpp">

  <span class="operator">!</span>qgetenv(varName)<span class="operator">.</span>isNull()

</pre>
<p>except that it's potentially much faster, and can't throw exceptions.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qtglobal.html#qgetenv">qgetenv</a>() and <a href="qtglobal.html#qEnvironmentVariableIsEmpty">qEnvironmentVariableIsEmpty</a>().</p>
<!-- @@@qEnvironmentVariableIsSet -->
<!-- $$$qFloatDistance[overload1]$$$qFloatDistancefloatfloat -->
<h3 class="fn" id="qFloatDistance"><a name="qFloatDistance"></a><span class="type"><a href="qtglobal.html#quint32-typedef">quint32</a></span> <span class="name">qFloatDistance</span>(<span class="type">float</span> <i>a</i>, <span class="type">float</span> <i>b</i>)</h3>
<p>Returns the number of representable floating-point numbers between <i>a</i> and <i>b</i>.</p>
<p>This function provides an alternative way of doing approximated comparisons of floating-point numbers similar to <a href="qfloat16.html#qFuzzyCompare">qFuzzyCompare</a>(). However, it returns the distance between two numbers, which gives the caller a possibility to choose the accepted error. Errors are relative, so for instance the distance between 1.0E-5 and 1.00001E-5 will give 110, while the distance between 1.0E36 and 1.00001E36 will give 127.</p>
<p>This function is useful if a floating point comparison requires a certain precision. Therefore, if <i>a</i> and <i>b</i> are equal it will return 0. The maximum value it will return for 32-bit floating point numbers is 4,278,190,078. This is the distance between <code>-FLT_MAX</code> and <code>+FLT_MAX</code>.</p>
<p>The function does not give meaningful results if any of the arguments are <code>Infinite</code> or <code>NaN</code>. You can check for this by calling <a href="qfloat16.html#qIsFinite">qIsFinite</a>().</p>
<p>The return value can be considered as the &quot;error&quot;, so if you for instance want to compare two 32-bit floating point numbers and all you need is an approximated 24-bit precision, you can use this function like this:</p>
<pre class="cpp">

  <span class="keyword">if</span> (qFloatDistance(a<span class="operator">,</span> b) <span class="operator">&lt;</span> (<span class="number">1</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">7</span>)) {   <span class="comment">// The last 7 bits are not</span>
                                          <span class="comment">// significant</span>
      <span class="comment">// precise enough</span>
  }

</pre>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qfloat16.html#qFuzzyCompare">qFuzzyCompare</a>().</p>
<!-- @@@qFloatDistance -->
<!-- $$$qFloatDistance$$$qFloatDistancedoubledouble -->
<h3 class="fn" id="qFloatDistance-1"><a name="qFloatDistance-1"></a><span class="type"><a href="qtglobal.html#quint64-typedef">quint64</a></span> <span class="name">qFloatDistance</span>(<span class="type">double</span> <i>a</i>, <span class="type">double</span> <i>b</i>)</h3>
<p>Returns the number of representable floating-point numbers between <i>a</i> and <i>b</i>.</p>
<p>This function serves the same purpose as <code>qFloatDistance(float, float)</code>, but returns the distance between two <code>double</code> numbers. Since the range is larger than for two <code>float</code> numbers (<code>[-DBL_MAX,DBL_MAX]</code>), the return type is quint64.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qfloat16.html#qFuzzyCompare">qFuzzyCompare</a>().</p>
<!-- @@@qFloatDistance -->
<!-- $$$qFormatLogMessage[overload1]$$$qFormatLogMessageQtMsgTypeconstQMessageLogContext&constQString& -->
<h3 class="fn" id="qFormatLogMessage"><a name="qFormatLogMessage"></a><span class="type"><a href="qstring.html">QString</a></span> <span class="name">qFormatLogMessage</span>(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span> <i>type</i>, const <span class="type"><a href="qmessagelogcontext.html">QMessageLogContext</a></span> &amp;<i>context</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>)</h3>
<p>Generates a formatted string out of the <i>type</i>, <i>context</i>, <i>str</i> arguments.</p>
<p>qFormatLogMessage returns a <a href="qstring.html">QString</a> that is formatted according to the current message pattern. It can be used by custom message handlers to format output similar to Qt's default message handler.</p>
<p>The function is thread-safe.</p>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>() and <a href="qtglobal.html#qSetMessagePattern">qSetMessagePattern</a>().</p>
<!-- @@@qFormatLogMessage -->
<!-- $$$qFuzzyCompare[overload1]$$$qFuzzyComparedoubledouble -->
<h3 class="fn" id="qFuzzyCompare"><a name="qFuzzyCompare"></a><code>[static] </code><span class="type">bool</span> <span class="name">qFuzzyCompare</span>(<span class="type">double</span> <i>p1</i>, <span class="type">double</span> <i>p2</i>)</h3>
<p>Compares the floating point value <i>p1</i> and <i>p2</i> and returns <code>true</code> if they are considered equal, otherwise <code>false</code>.</p>
<p>Note that comparing values where either <i>p1</i> or <i>p2</i> is 0.0 will not work, nor does comparing values where one of the values is NaN or infinity. If one of the values is always 0.0, use <a href="qtglobal.html#qFuzzyIsNull">qFuzzyIsNull</a> instead. If one of the values is likely to be 0.0, one solution is to add 1.0 to both values.</p>
<pre class="cpp">

          <span class="comment">// Instead of comparing with 0.0</span>
                  <a href="qfloat16.html#qFuzzyCompare">qFuzzyCompare</a>(<span class="number">0.0</span><span class="operator">,</span><span class="number">1.0e</span><span class="operator">-</span><span class="number">200</span>); <span class="comment">// This will return false</span>
          <span class="comment">// Compare adding 1 to both values will fix the problem</span>
                  <a href="qfloat16.html#qFuzzyCompare">qFuzzyCompare</a>(<span class="number">1</span> <span class="operator">+</span> <span class="number">0.0</span><span class="operator">,</span> <span class="number">1</span> <span class="operator">+</span> <span class="number">1.0e</span><span class="operator">-</span><span class="number">200</span>); <span class="comment">// This will return true</span>

</pre>
<p>The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@qFuzzyCompare -->
<!-- $$$qFuzzyCompare$$$qFuzzyComparefloatfloat -->
<h3 class="fn" id="qFuzzyCompare-1"><a name="qFuzzyCompare-1"></a><code>[static] </code><span class="type">bool</span> <span class="name">qFuzzyCompare</span>(<span class="type">float</span> <i>p1</i>, <span class="type">float</span> <i>p2</i>)</h3>
<p>Compares the floating point value <i>p1</i> and <i>p2</i> and returns <code>true</code> if they are considered equal, otherwise <code>false</code>.</p>
<p>The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@qFuzzyCompare -->
<!-- $$$qFuzzyIsNull[overload1]$$$qFuzzyIsNulldouble -->
<h3 class="fn" id="qFuzzyIsNull"><a name="qFuzzyIsNull"></a><code>[static] </code><span class="type">bool</span> <span class="name">qFuzzyIsNull</span>(<span class="type">double</span> <i>d</i>)</h3>
<p>Returns true if the absolute value of <i>d</i> is within 0.000000000001 of 0.0&#x2e;</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@qFuzzyIsNull -->
<!-- $$$qFuzzyIsNull$$$qFuzzyIsNullfloat -->
<h3 class="fn" id="qFuzzyIsNull-1"><a name="qFuzzyIsNull-1"></a><code>[static] </code><span class="type">bool</span> <span class="name">qFuzzyIsNull</span>(<span class="type">float</span> <i>f</i>)</h3>
<p>Returns true if the absolute value of <i>f</i> is within 0.00001f of 0.0&#x2e;</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@qFuzzyIsNull -->
<!-- $$$qInf[overload1]$$$qInf -->
<h3 class="fn" id="qInf"><a name="qInf"></a><span class="type">double</span> <span class="name">qInf</span>()</h3>
<p>Returns the bit pattern for an infinite number as a double.</p>
<!-- @@@qInf -->
<!-- $$$qInstallMessageHandler[overload1]$$$qInstallMessageHandlerQtMessageHandler -->
<h3 class="fn" id="qInstallMessageHandler"><a name="qInstallMessageHandler"></a><span class="type"><a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a></span> <span class="name">qInstallMessageHandler</span>(<span class="type"><a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a></span> <i>handler</i>)</h3>
<p>Installs a Qt message <i>handler</i> which has been defined previously. Returns a pointer to the previous message handler.</p>
<p>The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages.</p>
<p>The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately.</p>
<p>Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.</p>
<p>To restore the message handler, call <code>qInstallMessageHandler(0)</code>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;qapplication.h&gt;</span>
  <span class="preprocessor">#include &lt;stdio.h&gt;</span>
  <span class="preprocessor">#include &lt;stdlib.h&gt;</span>

  <span class="type">void</span> myMessageOutput(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span> type<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qmessagelogcontext.html">QMessageLogContext</a></span> <span class="operator">&amp;</span>context<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&amp;</span>msg)
  {
      <span class="type"><a href="qbytearray.html">QByteArray</a></span> localMsg <span class="operator">=</span> msg<span class="operator">.</span>toLocal8Bit();
      <span class="keyword">switch</span> (type) {
      <span class="keyword">case</span> <span class="type"><a href="qtglobal.html#QtMsgType-enum">QtDebugMsg</a></span>:
          fprintf(stderr<span class="operator">,</span> <span class="string">&quot;Debug: %s (%s:%u, %s)\n&quot;</span><span class="operator">,</span> localMsg<span class="operator">.</span>constData()<span class="operator">,</span> context<span class="operator">.</span>file<span class="operator">,</span> context<span class="operator">.</span>line<span class="operator">,</span> context<span class="operator">.</span>function);
          <span class="keyword">break</span>;
      <span class="keyword">case</span> <span class="type"><a href="qtglobal.html#QtMsgType-enum">QtInfoMsg</a></span>:
          fprintf(stderr<span class="operator">,</span> <span class="string">&quot;Info: %s (%s:%u, %s)\n&quot;</span><span class="operator">,</span> localMsg<span class="operator">.</span>constData()<span class="operator">,</span> context<span class="operator">.</span>file<span class="operator">,</span> context<span class="operator">.</span>line<span class="operator">,</span> context<span class="operator">.</span>function);
          <span class="keyword">break</span>;
      <span class="keyword">case</span> <span class="type"><a href="qtglobal.html#QtMsgType-enum">QtWarningMsg</a></span>:
          fprintf(stderr<span class="operator">,</span> <span class="string">&quot;Warning: %s (%s:%u, %s)\n&quot;</span><span class="operator">,</span> localMsg<span class="operator">.</span>constData()<span class="operator">,</span> context<span class="operator">.</span>file<span class="operator">,</span> context<span class="operator">.</span>line<span class="operator">,</span> context<span class="operator">.</span>function);
          <span class="keyword">break</span>;
      <span class="keyword">case</span> <span class="type"><a href="qtglobal.html#QtMsgType-enum">QtCriticalMsg</a></span>:
          fprintf(stderr<span class="operator">,</span> <span class="string">&quot;Critical: %s (%s:%u, %s)\n&quot;</span><span class="operator">,</span> localMsg<span class="operator">.</span>constData()<span class="operator">,</span> context<span class="operator">.</span>file<span class="operator">,</span> context<span class="operator">.</span>line<span class="operator">,</span> context<span class="operator">.</span>function);
          <span class="keyword">break</span>;
      <span class="keyword">case</span> <span class="type"><a href="qtglobal.html#QtMsgType-enum">QtFatalMsg</a></span>:
          fprintf(stderr<span class="operator">,</span> <span class="string">&quot;Fatal: %s (%s:%u, %s)\n&quot;</span><span class="operator">,</span> localMsg<span class="operator">.</span>constData()<span class="operator">,</span> context<span class="operator">.</span>file<span class="operator">,</span> context<span class="operator">.</span>line<span class="operator">,</span> context<span class="operator">.</span>function);
          abort();
      }
  }

  <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span><span class="operator">*</span>argv)
  {
      qInstallMessageHandler(myMessageOutput);
      <span class="type"><a href="../qtwidgets/qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="keyword">return</span> app<span class="operator">.</span>exec();
  }

</pre>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a>, <a href="qtglobal.html#QtMsgType-enum">QtMsgType</a>, <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), and Debugging Techniques.</p>
<!-- @@@qInstallMessageHandler -->
<!-- $$$qIsFinite[overload1]$$$qIsFinitedouble -->
<h3 class="fn" id="qIsFinite"><a name="qIsFinite"></a><span class="type">bool</span> <span class="name">qIsFinite</span>(<span class="type">double</span> <i>d</i>)</h3>
<p>Returns <code>true</code> if the double <i>d</i> is a finite number.</p>
<!-- @@@qIsFinite -->
<!-- $$$qIsFinite$$$qIsFinitefloat -->
<h3 class="fn" id="qIsFinite-1"><a name="qIsFinite-1"></a><span class="type">bool</span> <span class="name">qIsFinite</span>(<span class="type">float</span> <i>f</i>)</h3>
<p>Returns <code>true</code> if the float <i>f</i> is a finite number.</p>
<!-- @@@qIsFinite -->
<!-- $$$qIsInf[overload1]$$$qIsInfdouble -->
<h3 class="fn" id="qIsInf"><a name="qIsInf"></a><span class="type">bool</span> <span class="name">qIsInf</span>(<span class="type">double</span> <i>d</i>)</h3>
<p>Returns <code>true</code> if the double <i>d</i> is equivalent to infinity.</p>
<!-- @@@qIsInf -->
<!-- $$$qIsInf$$$qIsInffloat -->
<h3 class="fn" id="qIsInf-1"><a name="qIsInf-1"></a><span class="type">bool</span> <span class="name">qIsInf</span>(<span class="type">float</span> <i>f</i>)</h3>
<p>Returns <code>true</code> if the float <i>f</i> is equivalent to infinity.</p>
<!-- @@@qIsInf -->
<!-- $$$qIsNaN[overload1]$$$qIsNaNdouble -->
<h3 class="fn" id="qIsNaN"><a name="qIsNaN"></a><span class="type">bool</span> <span class="name">qIsNaN</span>(<span class="type">double</span> <i>d</i>)</h3>
<p>Returns <code>true</code> if the double <i>d</i> is not a number (NaN).</p>
<!-- @@@qIsNaN -->
<!-- $$$qIsNaN$$$qIsNaNfloat -->
<h3 class="fn" id="qIsNaN-1"><a name="qIsNaN-1"></a><span class="type">bool</span> <span class="name">qIsNaN</span>(<span class="type">float</span> <i>f</i>)</h3>
<p>Returns <code>true</code> if the float <i>f</i> is not a number (NaN).</p>
<!-- @@@qIsNaN -->
<!-- $$$qMax[overload1]$$$qMaxconstT&constT& -->
<h3 class="fn" id="qMaxx"><a name="qMaxx"></a>const <span class="type">T</span> &amp;<span class="name">qMax</span>(const <span class="type">T</span> &amp;<i>value1</i>, const <span class="type">T</span> &amp;<i>value2</i>)</h3>
<p>Returns the maximum of <i>value1</i> and <i>value2</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> myValue <span class="operator">=</span> <span class="number">6</span>;
  <span class="type">int</span> yourValue <span class="operator">=</span> <span class="number">4</span>;

  <span class="type">int</span> maxValue <span class="operator">=</span> qMax(myValue<span class="operator">,</span> yourValue);
  <span class="comment">// maxValue == myValue</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#qMinx">qMin</a>() and <a href="qtglobal.html#qBound">qBound</a>().</p>
<!-- @@@qMax -->
<!-- $$$qMin[overload1]$$$qMinconstT&constT& -->
<h3 class="fn" id="qMinx"><a name="qMinx"></a>const <span class="type">T</span> &amp;<span class="name">qMin</span>(const <span class="type">T</span> &amp;<i>value1</i>, const <span class="type">T</span> &amp;<i>value2</i>)</h3>
<p>Returns the minimum of <i>value1</i> and <i>value2</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> myValue <span class="operator">=</span> <span class="number">6</span>;
  <span class="type">int</span> yourValue <span class="operator">=</span> <span class="number">4</span>;

  <span class="type">int</span> minValue <span class="operator">=</span> qMin(myValue<span class="operator">,</span> yourValue);
  <span class="comment">// minValue == yourValue</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#qMaxx">qMax</a>() and <a href="qtglobal.html#qBound">qBound</a>().</p>
<!-- @@@qMin -->
<!-- $$$qNonConstOverload[overload1]$$$qNonConstOverloadT -->
<h3 class="fn" id="qNonConstOverload"><a name="qNonConstOverload"></a><span class="type">auto</span> <span class="name">qNonConstOverload</span>(<span class="type">T</span> <i>memberFunctionPointer</i>)</h3>
<p>Returns the <i>memberFunctionPointer</i> pointer to a non-constant member function:</p>
<pre class="cpp">

      <span class="keyword">struct</span> Foo {
          <span class="type">void</span> overloadedFunction(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span>);
          <span class="type">void</span> overloadedFunction(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span>) <span class="keyword">const</span>;
      };
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <a href="qtglobal.html#qConstOverload">qConstOverload</a><span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> qNonConstOverload<span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)

</pre>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtglobal.html#qOverload">qOverload</a>, qNonConstOverload, and Differences between String-Based and Functor-Based Connections.</p>
<!-- @@@qNonConstOverload -->
<!-- $$$qOverload[overload1]$$$qOverloadT -->
<h3 class="fn" id="qOverload"><a name="qOverload"></a><span class="type">auto</span> <span class="name">qOverload</span>(<span class="type">T</span> <i>functionPointer</i>)</h3>
<p>Returns a pointer to an overloaded function. The template parameter is the list of the argument types of the function. <i>functionPointer</i> is the pointer to the (member) function:</p>
<pre class="cpp">

      <span class="keyword">struct</span> Foo {
          <span class="type">void</span> overloadedFunction();
          <span class="type">void</span> overloadedFunction(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span>);
      };
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> qOverload<span class="operator">&lt;</span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> qOverload<span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)

</pre>
<p>If a member function is also const-overloaded <a href="qtglobal.html#qConstOverload">qConstOverload</a> and <a href="qtglobal.html#qNonConstOverload">qNonConstOverload</a> need to be used.</p>
<p>qOverload() requires C++14 enabled. In C++11-only code, the helper classes QOverload, QConstOverload, and QNonConstOverload can be used directly:</p>
<pre class="cpp">

      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span>Foo<span class="operator">::</span>overloadedFunction)

</pre>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtglobal.html#qConstOverload">qConstOverload</a>(), <a href="qtglobal.html#qNonConstOverload">qNonConstOverload</a>(), and Differences between String-Based and Functor-Based Connections.</p>
<!-- @@@qOverload -->
<!-- $$$qQNaN[overload1]$$$qQNaN -->
<h3 class="fn" id="qQNaN"><a name="qQNaN"></a><span class="type">double</span> <span class="name">qQNaN</span>()</h3>
<p>Returns the bit pattern of a quiet NaN as a double.</p>
<!-- @@@qQNaN -->
<!-- $$$qRound64[overload1]$$$qRound64double -->
<h3 class="fn" id="qRound64"><a name="qRound64"></a><span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> <span class="name">qRound64</span>(<span class="type">double</span> <i>value</i>)</h3>
<p>Rounds <i>value</i> to the nearest 64-bit integer.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">double</span> valueA <span class="operator">=</span> <span class="number">42949672960.3</span>;
  <span class="type">double</span> valueB <span class="operator">=</span> <span class="number">42949672960.7</span>;

  <span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> roundedValueA <span class="operator">=</span> qRound64(valueA);
  <span class="comment">// roundedValueA = 42949672960</span>
  <span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> roundedValueB <span class="operator">=</span> qRound64(valueB);
  <span class="comment">// roundedValueB = 42949672961</span>

</pre>
<!-- @@@qRound64 -->
<!-- $$$qRound64$$$qRound64float -->
<h3 class="fn" id="qRound64-1"><a name="qRound64-1"></a><span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> <span class="name">qRound64</span>(<span class="type">float</span> <i>value</i>)</h3>
<p>Rounds <i>value</i> to the nearest 64-bit integer.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">float</span> valueA <span class="operator">=</span> <span class="number">42949672960.3</span>;
  <span class="type">float</span> valueB <span class="operator">=</span> <span class="number">42949672960.7</span>;

  <span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> roundedValueA <span class="operator">=</span> qRound64(valueA);
  <span class="comment">// roundedValueA = 42949672960</span>
  <span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> roundedValueB <span class="operator">=</span> qRound64(valueB);
  <span class="comment">// roundedValueB = 42949672961</span>

</pre>
<!-- @@@qRound64 -->
<!-- $$$qRound[overload1]$$$qRounddouble -->
<h3 class="fn" id="qRound"><a name="qRound"></a><span class="type">int</span> <span class="name">qRound</span>(<span class="type">double</span> <i>value</i>)</h3>
<p>Rounds <i>value</i> to the nearest integer.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">double</span> valueA <span class="operator">=</span> <span class="number">2.3</span>;
  <span class="type">double</span> valueB <span class="operator">=</span> <span class="number">2.7</span>;

  <span class="type">int</span> roundedValueA <span class="operator">=</span> <a href="qfloat16.html#qRound">qRound</a>(valueA);
  <span class="comment">// roundedValueA = 2</span>
  <span class="type">int</span> roundedValueB <span class="operator">=</span> <a href="qfloat16.html#qRound">qRound</a>(valueB);
  <span class="comment">// roundedValueB = 3</span>

</pre>
<!-- @@@qRound -->
<!-- $$$qRound$$$qRoundfloat -->
<h3 class="fn" id="qRound-1"><a name="qRound-1"></a><span class="type">int</span> <span class="name">qRound</span>(<span class="type">float</span> <i>value</i>)</h3>
<p>Rounds <i>value</i> to the nearest integer.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">float</span> valueA <span class="operator">=</span> <span class="number">2.3</span>;
  <span class="type">float</span> valueB <span class="operator">=</span> <span class="number">2.7</span>;

  <span class="type">int</span> roundedValueA <span class="operator">=</span> <a href="qfloat16.html#qRound">qRound</a>(valueA);
  <span class="comment">// roundedValueA = 2</span>
  <span class="type">int</span> roundedValueB <span class="operator">=</span> <a href="qfloat16.html#qRound">qRound</a>(valueB);
  <span class="comment">// roundedValueB = 3</span>

</pre>
<!-- @@@qRound -->
<!-- $$$qSNaN[overload1]$$$qSNaN -->
<h3 class="fn" id="qSNaN"><a name="qSNaN"></a><span class="type">double</span> <span class="name">qSNaN</span>()</h3>
<p>Returns the bit pattern of a signalling NaN as a double.</p>
<!-- @@@qSNaN -->
<!-- $$$qSetMessagePattern[overload1]$$$qSetMessagePatternconstQString& -->
<h3 class="fn" id="qSetMessagePattern"><a name="qSetMessagePattern"></a><span class="type">void</span> <span class="name">qSetMessagePattern</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>pattern</i>)</h3>
<p>Changes the output of the default message handler.</p>
<p>Allows to tweak the output of <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), and <a href="qtglobal.html#qFatal">qFatal</a>(). The category logging output of <a href="qloggingcategory.html#qCDebug">qCDebug</a>(), <a href="qloggingcategory.html#qCInfo">qCInfo</a>(), <a href="qloggingcategory.html#qCWarning">qCWarning</a>(), and <a href="qloggingcategory.html#qCCritical">qCCritical</a>() is formatted, too.</p>
<p>Following placeholders are supported:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Placeholder</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><code>%{appname}</code></td><td ><a href="qcoreapplication.html#applicationName-prop">QCoreApplication::applicationName</a>()</td></tr>
<tr valign="top" class="even"><td ><code>%{category}</code></td><td >Logging category</td></tr>
<tr valign="top" class="odd"><td ><code>%{file}</code></td><td >Path to source file</td></tr>
<tr valign="top" class="even"><td ><code>%{function}</code></td><td >Function</td></tr>
<tr valign="top" class="odd"><td ><code>%{line}</code></td><td >Line in source file</td></tr>
<tr valign="top" class="even"><td ><code>%{message}</code></td><td >The actual message</td></tr>
<tr valign="top" class="odd"><td ><code>%{pid}</code></td><td ><a href="qcoreapplication.html#applicationPid">QCoreApplication::applicationPid</a>()</td></tr>
<tr valign="top" class="even"><td ><code>%{threadid}</code></td><td >The system-wide ID of current thread (if it can be obtained)</td></tr>
<tr valign="top" class="odd"><td ><code>%{qthreadptr}</code></td><td >A pointer to the current <a href="qthread.html">QThread</a> (result of <a href="qthread.html#currentThread">QThread::currentThread</a>())</td></tr>
<tr valign="top" class="even"><td ><code>%{type}</code></td><td >&quot;debug&quot;, &quot;warning&quot;, &quot;critical&quot; or &quot;fatal&quot;</td></tr>
<tr valign="top" class="odd"><td ><code>%{time process}</code></td><td >time of the message, in seconds since the process started (the token &quot;process&quot; is literal)</td></tr>
<tr valign="top" class="even"><td ><code>%{time boot}</code></td><td >the time of the message, in seconds since the system boot if that can be determined (the token &quot;boot&quot; is literal). If the time since boot could not be obtained, the output is indeterminate (see <a href="qelapsedtimer.html#msecsSinceReference">QElapsedTimer::msecsSinceReference</a>()).</td></tr>
<tr valign="top" class="odd"><td ><code>%{time [format]}</code></td><td >system time when the message occurred, formatted by passing the <code>format</code> to <a href="qdatetime.html#toString">QDateTime::toString</a>(). If the format is not specified, the format of <a href="qt.html#DateFormat-enum">Qt::ISODate</a> is used.</td></tr>
<tr valign="top" class="even"><td ><code>%{backtrace [depth=N] [separator=&quot;..&#x2e;&quot;]}</code></td><td >A backtrace with the number of frames specified by the optional <code>depth</code> parameter (defaults to 5), and separated by the optional <code>separator</code> parameter (defaults to &quot;|&quot;). This expansion is available only on some platforms (currently only platfoms using glibc). Names are only known for exported functions. If you want to see the name of every function in your application, use <code>QMAKE_LFLAGS += -rdynamic</code>. When reading backtraces, take into account that frames might be missing due to inlining or tail call optimization.</td></tr>
</table></div>
<p>You can also use conditionals on the type of the message using <code>%{if-debug}</code>, <code>%{if-info}</code> <code>%{if-warning}</code>, <code>%{if-critical}</code> or <code>%{if-fatal}</code> followed by an <code>%{endif}</code>. What is inside the <code>%{if-*}</code> and <code>%{endif}</code> will only be printed if the type matches.</p>
<p>Finally, text inside <code>%{if-category}</code> ..&#x2e; <code>%{endif}</code> is only printed if the category is not the default one.</p>
<p>Example:</p>
<pre class="cpp">

  QT_MESSAGE_PATTERN<span class="operator">=</span><span class="string">&quot;[%{time yyyyMMdd h:mm:ss.zzz t} %{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{file}:%{line} - %{message}&quot;</span>

</pre>
<p>The default <i>pattern</i> is &quot;%{if-category}%{category}: %{endif}%{message}&quot;.</p>
<p>The <i>pattern</i> can also be changed at runtime by setting the QT_MESSAGE_PATTERN environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is set, the environment variable takes precedence.</p>
<p>Custom message handlers can use <a href="qtglobal.html#qFormatLogMessage">qFormatLogMessage</a>() to take <i>pattern</i> into account.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), Debugging Techniques, and <a href="qloggingcategory.html">QLoggingCategory</a>.</p>
<!-- @@@qSetMessagePattern -->
<!-- $$$q_check_ptr[overload1]$$$q_check_ptrT* -->
<h3 class="fn" id="q_check_ptr"><a name="q_check_ptr"></a><span class="type">T</span> *<span class="name">q_check_ptr</span>(<span class="type">T</span> *<i>pointer</i>)</h3>
<p>Uses <a href="qtglobal.html#Q_CHECK_PTRx">Q_CHECK_PTR</a> on <i>pointer</i>, then returns <i>pointer</i>.</p>
<p>This can be used as an inline version of <a href="qtglobal.html#Q_CHECK_PTRx">Q_CHECK_PTR</a>.</p>
<!-- @@@q_check_ptr -->
<!-- $$$qgetenv[overload1]$$$qgetenvconstchar* -->
<h3 class="fn" id="qgetenv"><a name="qgetenv"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> <span class="name">qgetenv</span>(const <span class="type">char</span> *<i>varName</i>)</h3>
<p>Returns the value of the environment variable with name <i>varName</i>. To get the variable string, use <a href="qbytearray.html#constData">QByteArray::constData</a>(). To convert the data to a <a href="qstring.html">QString</a> use <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>().</p>
<p><b>Note: </b>qgetenv() was introduced because getenv() from the standard C library was deprecated in VC2005 (and later versions). qgetenv() uses the new replacement function in VC, and calls the standard C library's implementation on all other platforms.</p><p><b>Warning:</b> Don't use qgetenv on Windows if the content may contain non-US-ASCII characters, like file paths.</p>
<p><b>See also </b><a href="qtglobal.html#qputenv">qputenv</a>(), <a href="qtglobal.html#qEnvironmentVariableIsSet">qEnvironmentVariableIsSet</a>(), and <a href="qtglobal.html#qEnvironmentVariableIsEmpty">qEnvironmentVariableIsEmpty</a>().</p>
<!-- @@@qgetenv -->
<!-- $$$qputenv[overload1]$$$qputenvconstchar*constQByteArray& -->
<h3 class="fn" id="qputenv"><a name="qputenv"></a><span class="type">bool</span> <span class="name">qputenv</span>(const <span class="type">char</span> *<i>varName</i>, const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>value</i>)</h3>
<p>This function sets the <i>value</i> of the environment variable named <i>varName</i>. It will create the variable if it does not exist. It returns 0 if the variable could not be set.</p>
<p>Calling qputenv with an empty value removes the environment variable on Windows, and makes it set (but empty) on Unix. Prefer using <a href="qtglobal.html#qunsetenv">qunsetenv</a>() for fully portable behavior.</p>
<p><b>Note: </b>qputenv() was introduced because putenv() from the standard C library was deprecated in VC2005 (and later versions). qputenv() uses the replacement function in VC, and calls the standard C library's implementation on all other platforms.</p><p><b>See also </b><a href="qtglobal.html#qgetenv">qgetenv</a>().</p>
<!-- @@@qputenv -->
<!-- $$$qrand[overload1]$$$qrand -->
<h3 class="fn" id="qrand"><a name="qrand"></a><span class="type">int</span> <span class="name">qrand</span>()</h3>
<p>Thread-safe version of the standard C++ <code>rand()</code> function.</p>
<p>Returns a value between 0 and <code>RAND_MAX</code> (defined in <code>&lt;cstdlib&gt;</code> and <code>&lt;stdlib.h&gt;</code>), the next number in the current sequence of pseudo-random integers.</p>
<p>Use <code>qsrand()</code> to initialize the pseudo-random number generator with a seed value.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtglobal.html#qsrand">qsrand</a>().</p>
<!-- @@@qrand -->
<!-- $$$qsrand[overload1]$$$qsranduint -->
<h3 class="fn" id="qsrand"><a name="qsrand"></a><span class="type">void</span> <span class="name">qsrand</span>(<span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>seed</i>)</h3>
<p>Thread-safe version of the standard C++ <code>srand()</code> function.</p>
<p>Sets the argument <i>seed</i> to be used to generate a new random number sequence of pseudo random integers to be returned by <a href="qtglobal.html#qrand">qrand</a>().</p>
<p>The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently call <a href="qtglobal.html#qrand">qrand</a>(), the threads will get the same random number sequence.</p>
<p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qtglobal.html#qrand">qrand</a>().</p>
<!-- @@@qsrand -->
<!-- $$$qtTrId[overload1]$$$qtTrIdconstchar*int -->
<h3 class="fn" id="qtTrId"><a name="qtTrId"></a><span class="type"><a href="qstring.html">QString</a></span> <span class="name">qtTrId</span>(const <span class="type">char</span> *<i>id</i>, <span class="type">int</span> <i>n</i> = -1)</h3>
<p>The qtTrId function finds and returns a translated string.</p>
<p>Returns a translated string identified by <i>id</i>. If no matching string is found, the id itself is returned. This should not happen under normal conditions.</p>
<p>If <i>n</i> &gt;= 0, all occurrences of <code>%n</code> in the resulting string are replaced with a decimal representation of <i>n</i>. In addition, depending on <i>n</i>'s value, the translation text may vary.</p>
<p>Meta data and comments can be passed as documented for <a href="qobject.html#tr">QObject::tr</a>(). In addition, it is possible to supply a source string template like that:</p>
<p><code>//% &lt;C string&gt;</code></p>
<p>or</p>
<p><code>\begincomment% &lt;C string&gt; \endcomment</code></p>
<p>Example:</p>
<pre class="cpp">

      <span class="comment">//% &quot;%n fooish bar(s) found.\n&quot;</span>
      <span class="comment">//% &quot;Do you want to continue?&quot;</span>
      <span class="type"><a href="qstring.html">QString</a></span> text <span class="operator">=</span> qtTrId(<span class="string">&quot;qtn_foo_bar&quot;</span><span class="operator">,</span> n);

</pre>
<p>Creating QM files suitable for use with this function requires passing the <code>-idbased</code> option to the <code>lrelease</code> tool.</p>
<p><b>Warning:</b> This method is reentrant only if all translators are installed <i>before</i> calling this method. Installing or removing translators while performing translations is not supported. Doing so will probably result in crashes or other undesirable behavior.</p>
<p><b>Note:</b> This function is reentrant.</p>
<p>This function was introduced in  Qt 4.6.</p>
<p><b>See also </b><a href="qobject.html#tr">QObject::tr</a>(), <a href="qcoreapplication.html#translate">QCoreApplication::translate</a>(), and Internationalization with Qt.</p>
<!-- @@@qtTrId -->
<!-- $$$qunsetenv[overload1]$$$qunsetenvconstchar* -->
<h3 class="fn" id="qunsetenv"><a name="qunsetenv"></a><span class="type">bool</span> <span class="name">qunsetenv</span>(const <span class="type">char</span> *<i>varName</i>)</h3>
<p>This function deletes the variable <i>varName</i> from the environment.</p>
<p>Returns <code>true</code> on success.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qtglobal.html#qputenv">qputenv</a>() and <a href="qtglobal.html#qgetenv">qgetenv</a>().</p>
<!-- @@@qunsetenv -->
<h2>Macro Documentation</h2>
<!-- $$$QT_DEPRECATED_WARNINGS[overload1]$$$QT_DEPRECATED_WARNINGS -->
<h3 class="fn" id="QT_DEPRECATED_WARNINGS"><a name="QT_DEPRECATED_WARNINGS"></a><span class="name">QT_DEPRECATED_WARNINGS</span></h3>
<p>If this macro is defined, the compiler will generate warnings if API declared as deprecated by Qt is used.</p>
<p><b>See also </b><a href="qtglobal.html#QT_DISABLE_DEPRECATED_BEFORE">QT_DISABLE_DEPRECATED_BEFORE</a>.</p>
<!-- @@@QT_DEPRECATED_WARNINGS -->
<!-- $$$QT_DISABLE_DEPRECATED_BEFORE[overload1]$$$QT_DISABLE_DEPRECATED_BEFORE -->
<h3 class="fn" id="QT_DISABLE_DEPRECATED_BEFORE"><a name="QT_DISABLE_DEPRECATED_BEFORE"></a><span class="name">QT_DISABLE_DEPRECATED_BEFORE</span></h3>
<p>This macro can be defined in the project file to disable functions deprecated in a specified version of Qt or any earlier version. The default version number is 5.0, meaning that functions deprecated in or before Qt 5.0 will not be included.</p>
<p>Examples: When using a future release of Qt 5, set QT_DISABLE_DEPRECATED_BEFORE=0x050100 to disable functions deprecated in Qt 5.1 and earlier. In any release, set QT_DISABLE_DEPRECATED_BEFORE=0x000000 to enable any functions, including the ones deprecated in Qt 5.0</p>
<p><b>See also </b><a href="qtglobal.html#QT_DEPRECATED_WARNINGS">QT_DEPRECATED_WARNINGS</a>.</p>
<!-- @@@QT_DISABLE_DEPRECATED_BEFORE -->
<!-- $$$QT_POINTER_SIZE[overload1]$$$QT_POINTER_SIZE -->
<h3 class="fn" id="QT_POINTER_SIZE"><a name="QT_POINTER_SIZE"></a><span class="name">QT_POINTER_SIZE</span></h3>
<p>Expands to the size of a pointer in bytes (4 or 8). This is equivalent to <code>sizeof(void *)</code> but can be used in a preprocessor directive.</p>
<!-- @@@QT_POINTER_SIZE -->
<!-- $$$QT_REQUIRE_VERSION[overload1]$$$QT_REQUIRE_VERSIONintchar**constchar* -->
<h3 class="fn" id="QT_REQUIRE_VERSION"><a name="QT_REQUIRE_VERSION"></a><span class="name">QT_REQUIRE_VERSION</span>(<span class="type">int</span> <i>argc</i>, <span class="type">char</span> **<i>argv</i>, const <span class="type">char</span> *<i>version</i>)</h3>
<p>This macro can be used to ensure that the application is run against a recent enough version of Qt. This is especially useful if your application depends on a specific bug fix introduced in a bug-fix release (e.g&#x2e;, 4.0&#x2e;2).</p>
<p>The <i>argc</i> and <i>argv</i> parameters are the <code>main()</code> function's <code>argc</code> and <code>argv</code> parameters. The <i>version</i> parameter is a string literal that specifies which version of Qt the application requires (e.g&#x2e;, &quot;4.0&#x2e;2&quot;).</p>
<p>Example:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;QApplication&gt;</span>
  <span class="preprocessor">#include &lt;QMessageBox&gt;</span>

  <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
  {
      QT_REQUIRE_VERSION(argc<span class="operator">,</span> argv<span class="operator">,</span> <span class="string">&quot;4.0.2&quot;</span>)

      <span class="type"><a href="../qtwidgets/qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="keyword">return</span> app<span class="operator">.</span>exec();
  }

</pre>
<!-- @@@QT_REQUIRE_VERSION -->
<!-- $$$QT_TRANSLATE_NOOP3[overload1]$$$QT_TRANSLATE_NOOP3 -->
<h3 class="fn" id="QT_TRANSLATE_NOOP3"><a name="QT_TRANSLATE_NOOP3"></a><span class="name">QT_TRANSLATE_NOOP3</span>(<i>context</i>, <i>sourceText</i>, <i>comment</i>)</h3>
<p>Marks the string literal <i>sourceText</i> for dynamic translation in the given <i>context</i> and with <i>comment</i>, i.e the stored <i>sourceText</i> will not be altered. The <i>context</i> is typically a class and also needs to be specified as string literal. The string literal <i>comment</i> will be available for translators using e.g&#x2e; Qt Linguist.</p>
<p>The macro expands to anonymous struct of the two string literals passed as <i>sourceText</i> and <i>comment</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="keyword">static</span> { <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>source; <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>comment; } greeting_strings<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span>
  {
      QT_TRANSLATE_NOOP3(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span> <span class="string">&quot;Hello&quot;</span><span class="operator">,</span>
                         <span class="string">&quot;A really friendly hello&quot;</span>)<span class="operator">,</span>
      QT_TRANSLATE_NOOP3(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span> <span class="string">&quot;Goodbye&quot;</span><span class="operator">,</span>
                         <span class="string">&quot;A really friendly goodbye&quot;</span>)
  };

  <span class="type"><a href="qstring.html">QString</a></span> FriendlyConversation<span class="operator">::</span>greeting(<span class="type">int</span> type)
  {
      <span class="keyword">return</span> tr(greeting_strings<span class="operator">[</span>type<span class="operator">]</span><span class="operator">.</span>source<span class="operator">,</span>
                greeting_strings<span class="operator">[</span>type<span class="operator">]</span><span class="operator">.</span>comment);
  }

  <span class="type"><a href="qstring.html">QString</a></span> global_greeting(<span class="type">int</span> type)
  {
      <span class="keyword">return</span> qApp<span class="operator">-</span><span class="operator">&gt;</span>translate(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span>
             greeting_strings<span class="operator">[</span>type<span class="operator">]</span><span class="operator">.</span>source<span class="operator">,</span>
             greeting_strings<span class="operator">[</span>type<span class="operator">]</span><span class="operator">.</span>comment);
  }

</pre>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qtglobal.html#QT_TR_NOOP">QT_TR_NOOP</a>(), <a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>(), and Internationalization with Qt.</p>
<!-- @@@QT_TRANSLATE_NOOP3 -->
<!-- $$$QT_TRANSLATE_NOOP[overload1]$$$QT_TRANSLATE_NOOP -->
<h3 class="fn" id="QT_TRANSLATE_NOOP"><a name="QT_TRANSLATE_NOOP"></a><span class="name">QT_TRANSLATE_NOOP</span>(<i>context</i>, <i>sourceText</i>)</h3>
<p>Marks the string literal <i>sourceText</i> for dynamic translation in the given <i>context</i>; i.e, the stored <i>sourceText</i> will not be altered. The <i>context</i> is typically a class and also needs to be specified as string literal.</p>
<p>The macro expands to <i>sourceText</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="keyword">static</span> <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>greeting_strings<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span> {
      QT_TRANSLATE_NOOP(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span> <span class="string">&quot;Hello&quot;</span>)<span class="operator">,</span>
      QT_TRANSLATE_NOOP(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span> <span class="string">&quot;Goodbye&quot;</span>)
  };

  <span class="type"><a href="qstring.html">QString</a></span> FriendlyConversation<span class="operator">::</span>greeting(<span class="type">int</span> type)
  {
      <span class="keyword">return</span> tr(greeting_strings<span class="operator">[</span>type<span class="operator">]</span>);
  }

  <span class="type"><a href="qstring.html">QString</a></span> global_greeting(<span class="type">int</span> type)
  {
      <span class="keyword">return</span> qApp<span class="operator">-</span><span class="operator">&gt;</span>translate(<span class="string">&quot;FriendlyConversation&quot;</span><span class="operator">,</span>
             greeting_strings<span class="operator">[</span>type<span class="operator">]</span>);
  }

</pre>
<p><b>See also </b><a href="qtglobal.html#QT_TR_NOOP">QT_TR_NOOP</a>(), <a href="qtglobal.html#QT_TRANSLATE_NOOP3">QT_TRANSLATE_NOOP3</a>(), and Internationalization with Qt.</p>
<!-- @@@QT_TRANSLATE_NOOP -->
<!-- $$$QT_TRID_NOOP[overload1]$$$QT_TRID_NOOP -->
<h3 class="fn" id="QT_TRID_NOOP"><a name="QT_TRID_NOOP"></a><span class="name">QT_TRID_NOOP</span>(<i>id</i>)</h3>
<p>The QT_TRID_NOOP macro marks an id for dynamic translation.</p>
<p>The only purpose of this macro is to provide an anchor for attaching meta data like to <a href="qtglobal.html#qtTrId">qtTrId</a>().</p>
<p>The macro expands to <i>id</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="keyword">static</span> <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span> <span class="keyword">const</span> ids<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span> {
      <span class="comment">//% &quot;This is the first text.&quot;</span>
      QT_TRID_NOOP(<span class="string">&quot;qtn_1st_text&quot;</span>)<span class="operator">,</span>
      <span class="comment">//% &quot;This is the second text.&quot;</span>
      QT_TRID_NOOP(<span class="string">&quot;qtn_2nd_text&quot;</span>)<span class="operator">,</span>
      <span class="number">0</span>
  };

  <span class="type">void</span> TheClass<span class="operator">::</span>addLabels()
  {
      <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; ids<span class="operator">[</span>i<span class="operator">]</span>; <span class="operator">+</span><span class="operator">+</span>i)
          <span class="keyword">new</span> <span class="type"><a href="../qtwidgets/qlabel.html">QLabel</a></span>(qtTrId(ids<span class="operator">[</span>i<span class="operator">]</span>)<span class="operator">,</span> <span class="keyword">this</span>);
  }

</pre>
<p>This function was introduced in  Qt 4.6.</p>
<p><b>See also </b><a href="qtglobal.html#qtTrId">qtTrId</a>() and Internationalization with Qt.</p>
<!-- @@@QT_TRID_NOOP -->
<!-- $$$QT_TR_NOOP[overload1]$$$QT_TR_NOOP -->
<h3 class="fn" id="QT_TR_NOOP"><a name="QT_TR_NOOP"></a><span class="name">QT_TR_NOOP</span>(<i>sourceText</i>)</h3>
<p>Marks the string literal <i>sourceText</i> for dynamic translation in the current context (class), i.e the stored <i>sourceText</i> will not be altered.</p>
<p>The macro expands to <i>sourceText</i>.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type"><a href="qstring.html">QString</a></span> FriendlyConversation<span class="operator">::</span>greeting(<span class="type">int</span> type)
  {
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>greeting_strings<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span> {
      QT_TR_NOOP(<span class="string">&quot;Hello&quot;</span>)<span class="operator">,</span>
      QT_TR_NOOP(<span class="string">&quot;Goodbye&quot;</span>)
  };
  <span class="keyword">return</span> tr(greeting_strings<span class="operator">[</span>type<span class="operator">]</span>);
  }

</pre>
<p>The macro QT_TR_NOOP_UTF8() is identical except that it tells lupdate that the source string is encoded in UTF-8. Corresponding variants exist in the <a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() family of macros, too.</p>
<p><b>See also </b><a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() and Internationalization with Qt.</p>
<!-- @@@QT_TR_NOOP -->
<!-- $$$QT_VERSION[overload1]$$$QT_VERSION -->
<h3 class="fn" id="QT_VERSION"><a name="QT_VERSION"></a><span class="name">QT_VERSION</span></h3>
<p>This macro expands a numeric value of the form 0xMMNNPP (MM = major, NN = minor, PP = patch) that specifies Qt's version number. For example, if you compile your application against Qt 4.1&#x2e;2, the QT_VERSION macro will expand to 0x040102.</p>
<p>You can use QT_VERSION to use the latest Qt features where available.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="preprocessor">#if QT_VERSION &gt;= 0x040100</span>
      <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> icon <span class="operator">=</span> style()<span class="operator">-</span><span class="operator">&gt;</span>standardIcon(<span class="type"><a href="../qtwidgets/qstyle.html">QStyle</a></span><span class="operator">::</span>SP_TrashIcon);
  <span class="preprocessor">#else</span>
      <span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> pixmap <span class="operator">=</span> style()<span class="operator">-</span><span class="operator">&gt;</span>standardPixmap(<span class="type"><a href="../qtwidgets/qstyle.html">QStyle</a></span><span class="operator">::</span>SP_TrashIcon);
      <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> icon(pixmap);
  <span class="preprocessor">#endif</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#QT_VERSION_STR">QT_VERSION_STR</a> and qVersion().</p>
<!-- @@@QT_VERSION -->
<!-- $$$QT_VERSION_CHECK[overload1]$$$QT_VERSION_CHECK -->
<h3 class="fn" id="QT_VERSION_CHECK"><a name="QT_VERSION_CHECK"></a><span class="name">QT_VERSION_CHECK</span></h3>
<p>Turns the major, minor and patch numbers of a version into an integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can be compared with another similarly processed version id.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;QtGlobal&gt;</span>

  <span class="preprocessor">#if (QT_VERSION &gt;= QT_VERSION_CHECK(5, 0, 0))</span>
  <span class="preprocessor">#include &lt;QtWidgets&gt;</span>
  <span class="preprocessor">#else</span>
  <span class="preprocessor">#include &lt;QtGui&gt;</span>
  <span class="preprocessor">#endif</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#QT_VERSION">QT_VERSION</a>.</p>
<!-- @@@QT_VERSION_CHECK -->
<!-- $$$QT_VERSION_STR[overload1]$$$QT_VERSION_STR -->
<h3 class="fn" id="QT_VERSION_STR"><a name="QT_VERSION_STR"></a><span class="name">QT_VERSION_STR</span></h3>
<p>This macro expands to a string that specifies Qt's version number (for example, &quot;4.1&#x2e;2&quot;). This is the version against which the application is compiled.</p>
<p><b>See also </b>qVersion() and <a href="qtglobal.html#QT_VERSION">QT_VERSION</a>.</p>
<!-- @@@QT_VERSION_STR -->
<!-- $$$Q_ASSERT[overload1]$$$Q_ASSERTbool -->
<h3 class="fn" id="Q_ASSERT"><a name="Q_ASSERT"></a><span class="type">void</span> <span class="name">Q_ASSERT</span>(<span class="type">bool</span> <i>test</i>)</h3>
<p>Prints a warning message containing the source code file name and line number if <i>test</i> is <code>false</code>.</p>
<p>Q_ASSERT() is useful for testing pre- and post-conditions during development. It does nothing if <code>QT_NO_DEBUG</code> was defined during compilation.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="comment">// File: div.cpp</span>

  <span class="preprocessor">#include &lt;QtGlobal&gt;</span>

  <span class="type">int</span> divide(<span class="type">int</span> a<span class="operator">,</span> <span class="type">int</span> b)
  {
      Q_ASSERT(b <span class="operator">!</span><span class="operator">=</span> <span class="number">0</span>);
      <span class="keyword">return</span> a <span class="operator">/</span> b;
  }

</pre>
<p>If <code>b</code> is zero, the Q_ASSERT statement will output the following message using the <a href="qtglobal.html#qFatal">qFatal</a>() function:</p>
<pre class="cpp">

  ASSERT: <span class="string">&quot;b != 0&quot;</span> in file div<span class="operator">.</span>cpp<span class="operator">,</span> line <span class="number">7</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_ASSERT_X">Q_ASSERT_X</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), and Debugging Techniques.</p>
<!-- @@@Q_ASSERT -->
<!-- $$$Q_ASSERT_X[overload1]$$$Q_ASSERT_Xboolconstchar*constchar* -->
<h3 class="fn" id="Q_ASSERT_X"><a name="Q_ASSERT_X"></a><span class="type">void</span> <span class="name">Q_ASSERT_X</span>(<span class="type">bool</span> <i>test</i>, const <span class="type">char</span> *<i>where</i>, const <span class="type">char</span> *<i>what</i>)</h3>
<p>Prints the message <i>what</i> together with the location <i>where</i>, the source file name and line number if <i>test</i> is <code>false</code>.</p>
<p>Q_ASSERT_X is useful for testing pre- and post-conditions during development. It does nothing if <code>QT_NO_DEBUG</code> was defined during compilation.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="comment">// File: div.cpp</span>

  <span class="preprocessor">#include &lt;QtGlobal&gt;</span>

  <span class="type">int</span> divide(<span class="type">int</span> a<span class="operator">,</span> <span class="type">int</span> b)
  {
      Q_ASSERT_X(b <span class="operator">!</span><span class="operator">=</span> <span class="number">0</span><span class="operator">,</span> <span class="string">&quot;divide&quot;</span><span class="operator">,</span> <span class="string">&quot;division by zero&quot;</span>);
      <span class="keyword">return</span> a <span class="operator">/</span> b;
  }

</pre>
<p>If <code>b</code> is zero, the Q_ASSERT_X statement will output the following message using the <a href="qtglobal.html#qFatal">qFatal</a>() function:</p>
<pre class="cpp">

  ASSERT failure in divide: <span class="string">&quot;division by zero&quot;</span><span class="operator">,</span> file div<span class="operator">.</span>cpp<span class="operator">,</span> line <span class="number">7</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), and Debugging Techniques.</p>
<!-- @@@Q_ASSERT_X -->
<!-- $$$Q_ASSUME[overload1]$$$Q_ASSUMEbool -->
<h3 class="fn" id="Q_ASSUME"><a name="Q_ASSUME"></a><span class="type">void</span> <span class="name">Q_ASSUME</span>(<span class="type">bool</span> <i>expr</i>)</h3>
<p>Causes the compiler to assume that <i>expr</i> is <code>true</code>. This macro is useful for improving code generation, by providing the compiler with hints about conditions that it would not otherwise know about. However, there is no guarantee that the compiler will actually use those hints.</p>
<p>This macro could be considered a &quot;lighter&quot; version of <a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a>(). While <a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a> will abort the program's execution if the condition is <code>false</code>, Q_ASSUME will tell the compiler not to generate code for those conditions. Therefore, it is important that the assumptions always hold, otherwise undefined behaviour may occur.</p>
<p>If <i>expr</i> is a constantly <code>false</code> condition, Q_ASSUME will tell the compiler that the current code execution cannot be reached. That is, Q_ASSUME(false) is equivalent to <a href="qtglobal.html#Q_UNREACHABLE">Q_UNREACHABLE</a>().</p>
<p>In debug builds the condition is enforced by an assert to facilitate debugging.</p>
<p><b>Note: </b><a href="qtglobal.html#Q_LIKELY">Q_LIKELY</a>() tells the compiler that the expression is likely, but not the only possibility. Q_ASSUME tells the compiler that it is the only possibility.</p><p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a>(), <a href="qtglobal.html#Q_UNREACHABLE">Q_UNREACHABLE</a>(), and <a href="qtglobal.html#Q_LIKELY">Q_LIKELY</a>().</p>
<!-- @@@Q_ASSUME -->
<!-- $$$Q_BIG_ENDIAN[overload1]$$$Q_BIG_ENDIAN -->
<h3 class="fn" id="Q_BIG_ENDIAN"><a name="Q_BIG_ENDIAN"></a><span class="name">Q_BIG_ENDIAN</span></h3>
<p>This macro represents a value you can compare to the macro <a href="qtglobal.html#Q_BYTE_ORDER">Q_BYTE_ORDER</a> to determine the endian-ness of your system. In a big-endian system, the most significant byte is stored at the lowest address. The other bytes follow in decreasing order of significance.</p>
<pre class="cpp">

  <span class="preprocessor">#if Q_BYTE_ORDER == Q_BIG_ENDIAN</span>
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  <span class="preprocessor">#endif</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_BYTE_ORDER">Q_BYTE_ORDER</a> and <a href="qtglobal.html#Q_LITTLE_ENDIAN">Q_LITTLE_ENDIAN</a>.</p>
<!-- @@@Q_BIG_ENDIAN -->
<!-- $$$Q_BYTE_ORDER[overload1]$$$Q_BYTE_ORDER -->
<h3 class="fn" id="Q_BYTE_ORDER"><a name="Q_BYTE_ORDER"></a><span class="name">Q_BYTE_ORDER</span></h3>
<p>This macro can be used to determine the byte order your system uses for storing data in memory. i.e&#x2e;, whether your system is little-endian or big-endian. It is set by Qt to one of the macros <a href="qtglobal.html#Q_LITTLE_ENDIAN">Q_LITTLE_ENDIAN</a> or <a href="qtglobal.html#Q_BIG_ENDIAN">Q_BIG_ENDIAN</a>. You normally won't need to worry about endian-ness, but you might, for example if you need to know which byte of an integer or UTF-16 character is stored in the lowest address. Endian-ness is important in networking, where computers with different values for Q_BYTE_ORDER must pass data back and forth.</p>
<p>Use this macro as in the following examples.</p>
<pre class="cpp">

  <span class="preprocessor">#if Q_BYTE_ORDER == Q_BIG_ENDIAN</span>
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  <span class="preprocessor">#endif</span>

  <span class="keyword">or</span>

  <span class="preprocessor">#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN</span>
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  <span class="preprocessor">#endif</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_BIG_ENDIAN">Q_BIG_ENDIAN</a> and <a href="qtglobal.html#Q_LITTLE_ENDIAN">Q_LITTLE_ENDIAN</a>.</p>
<!-- @@@Q_BYTE_ORDER -->
<!-- $$$Q_CC_BOR[overload1]$$$Q_CC_BOR -->
<h3 class="fn" id="Q_CC_BOR"><a name="Q_CC_BOR"></a><span class="name">Q_CC_BOR</span></h3>
<p>Defined if the application is compiled using Borland/Turbo C++.</p>
<!-- @@@Q_CC_BOR -->
<!-- $$$Q_CC_CDS[overload1]$$$Q_CC_CDS -->
<h3 class="fn" id="Q_CC_CDS"><a name="Q_CC_CDS"></a><span class="name">Q_CC_CDS</span></h3>
<p>Defined if the application is compiled using Reliant C++.</p>
<!-- @@@Q_CC_CDS -->
<!-- $$$Q_CC_CLANG[overload1]$$$Q_CC_CLANG -->
<h3 class="fn" id="Q_CC_CLANG"><a name="Q_CC_CLANG"></a><span class="name">Q_CC_CLANG</span></h3>
<p>Defined if the application is compiled using Clang.</p>
<!-- @@@Q_CC_CLANG -->
<!-- $$$Q_CC_COMEAU[overload1]$$$Q_CC_COMEAU -->
<h3 class="fn" id="Q_CC_COMEAU"><a name="Q_CC_COMEAU"></a><span class="name">Q_CC_COMEAU</span></h3>
<p>Defined if the application is compiled using Comeau C++.</p>
<!-- @@@Q_CC_COMEAU -->
<!-- $$$Q_CC_DEC[overload1]$$$Q_CC_DEC -->
<h3 class="fn" id="Q_CC_DEC"><a name="Q_CC_DEC"></a><span class="name">Q_CC_DEC</span></h3>
<p>Defined if the application is compiled using DEC C++.</p>
<!-- @@@Q_CC_DEC -->
<!-- $$$Q_CC_EDG[overload1]$$$Q_CC_EDG -->
<h3 class="fn" id="Q_CC_EDG"><a name="Q_CC_EDG"></a><span class="name">Q_CC_EDG</span></h3>
<p>Defined if the application is compiled using Edison Design Group C++.</p>
<!-- @@@Q_CC_EDG -->
<!-- $$$Q_CC_GHS[overload1]$$$Q_CC_GHS -->
<h3 class="fn" id="Q_CC_GHS"><a name="Q_CC_GHS"></a><span class="name">Q_CC_GHS</span></h3>
<p>Defined if the application is compiled using Green Hills Optimizing C++ Compilers.</p>
<!-- @@@Q_CC_GHS -->
<!-- $$$Q_CC_GNU[overload1]$$$Q_CC_GNU -->
<h3 class="fn" id="Q_CC_GNU"><a name="Q_CC_GNU"></a><span class="name">Q_CC_GNU</span></h3>
<p>Defined if the application is compiled using GNU C++.</p>
<!-- @@@Q_CC_GNU -->
<!-- $$$Q_CC_HIGHC[overload1]$$$Q_CC_HIGHC -->
<h3 class="fn" id="Q_CC_HIGHC"><a name="Q_CC_HIGHC"></a><span class="name">Q_CC_HIGHC</span></h3>
<p>Defined if the application is compiled using MetaWare High C/C++.</p>
<!-- @@@Q_CC_HIGHC -->
<!-- $$$Q_CC_HPACC[overload1]$$$Q_CC_HPACC -->
<h3 class="fn" id="Q_CC_HPACC"><a name="Q_CC_HPACC"></a><span class="name">Q_CC_HPACC</span></h3>
<p>Defined if the application is compiled using HP aC++.</p>
<!-- @@@Q_CC_HPACC -->
<!-- $$$Q_CC_INTEL[overload1]$$$Q_CC_INTEL -->
<h3 class="fn" id="Q_CC_INTEL"><a name="Q_CC_INTEL"></a><span class="name">Q_CC_INTEL</span></h3>
<p>Defined if the application is compiled using Intel C++ for Linux, Intel C++ for Windows.</p>
<!-- @@@Q_CC_INTEL -->
<!-- $$$Q_CC_KAI[overload1]$$$Q_CC_KAI -->
<h3 class="fn" id="Q_CC_KAI"><a name="Q_CC_KAI"></a><span class="name">Q_CC_KAI</span></h3>
<p>Defined if the application is compiled using KAI C++.</p>
<!-- @@@Q_CC_KAI -->
<!-- $$$Q_CC_MIPS[overload1]$$$Q_CC_MIPS -->
<h3 class="fn" id="Q_CC_MIPS"><a name="Q_CC_MIPS"></a><span class="name">Q_CC_MIPS</span></h3>
<p>Defined if the application is compiled using MIPSpro C++.</p>
<!-- @@@Q_CC_MIPS -->
<!-- $$$Q_CC_MSVC[overload1]$$$Q_CC_MSVC -->
<h3 class="fn" id="Q_CC_MSVC"><a name="Q_CC_MSVC"></a><span class="name">Q_CC_MSVC</span></h3>
<p>Defined if the application is compiled using Microsoft Visual C/C++, Intel C++ for Windows.</p>
<!-- @@@Q_CC_MSVC -->
<!-- $$$Q_CC_OC[overload1]$$$Q_CC_OC -->
<h3 class="fn" id="Q_CC_OC"><a name="Q_CC_OC"></a><span class="name">Q_CC_OC</span></h3>
<p>Defined if the application is compiled using CenterLine C++.</p>
<!-- @@@Q_CC_OC -->
<!-- $$$Q_CC_PGI[overload1]$$$Q_CC_PGI -->
<h3 class="fn" id="Q_CC_PGI"><a name="Q_CC_PGI"></a><span class="name">Q_CC_PGI</span></h3>
<p>Defined if the application is compiled using Portland Group C++.</p>
<!-- @@@Q_CC_PGI -->
<!-- $$$Q_CC_SUN[overload1]$$$Q_CC_SUN -->
<h3 class="fn" id="Q_CC_SUN"><a name="Q_CC_SUN"></a><span class="name">Q_CC_SUN</span></h3>
<p>Defined if the application is compiled using Forte Developer, or Sun Studio C++.</p>
<!-- @@@Q_CC_SUN -->
<!-- $$$Q_CC_SYM[overload1]$$$Q_CC_SYM -->
<h3 class="fn" id="Q_CC_SYM"><a name="Q_CC_SYM"></a><span class="name">Q_CC_SYM</span></h3>
<p>Defined if the application is compiled using Digital Mars C/C++ (used to be Symantec C++).</p>
<!-- @@@Q_CC_SYM -->
<!-- $$$Q_CC_USLC[overload1]$$$Q_CC_USLC -->
<h3 class="fn" id="Q_CC_USLC"><a name="Q_CC_USLC"></a><span class="name">Q_CC_USLC</span></h3>
<p>Defined if the application is compiled using SCO OUDK and UDK.</p>
<!-- @@@Q_CC_USLC -->
<!-- $$$Q_CC_WAT[overload1]$$$Q_CC_WAT -->
<h3 class="fn" id="Q_CC_WAT"><a name="Q_CC_WAT"></a><span class="name">Q_CC_WAT</span></h3>
<p>Defined if the application is compiled using Watcom C++.</p>
<!-- @@@Q_CC_WAT -->
<!-- $$$Q_CHECK_PTR[overload1]$$$Q_CHECK_PTRvoid* -->
<h3 class="fn" id="Q_CHECK_PTRx"><a name="Q_CHECK_PTRx"></a><span class="type">void</span> <span class="name">Q_CHECK_PTR</span>(<span class="type">void</span> *<i>pointer</i>)</h3>
<p>If <i>pointer</i> is 0, prints a message containing the source code's file name and line number, saying that the program ran out of memory and aborts program execution. It throws <code>std::bad_alloc</code> instead if exceptions are enabled.</p>
<p>Q_CHECK_PTR does nothing if <code>QT_NO_DEBUG</code> and <code>QT_NO_EXCEPTIONS</code> were defined during compilation. Therefore you must not use Q_CHECK_PTR to check for successful memory allocations because the check will be disabled in some cases.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> <span class="operator">*</span>a;

  Q_CHECK_PTR(a <span class="operator">=</span> <span class="keyword">new</span> <span class="type">int</span><span class="operator">[</span><span class="number">80</span><span class="operator">]</span>);   <span class="comment">// WRONG!</span>

  a <span class="operator">=</span> <span class="keyword">new</span> (nothrow) <span class="type">int</span><span class="operator">[</span><span class="number">80</span><span class="operator">]</span>;      <span class="comment">// Right</span>
  Q_CHECK_PTR(a);

</pre>
<p><b>See also </b><a href="qtglobal.html#qWarning">qWarning</a>() and Debugging Techniques.</p>
<!-- @@@Q_CHECK_PTR -->
<!-- $$$Q_DECLARE_TYPEINFO[overload1]$$$Q_DECLARE_TYPEINFO -->
<h3 class="fn" id="Q_DECLARE_TYPEINFO"><a name="Q_DECLARE_TYPEINFO"></a><span class="name">Q_DECLARE_TYPEINFO</span>(<i>Type</i>, <i>Flags</i>)</h3>
<p>You can use this macro to specify information about a custom type <i>Type</i>. With accurate type information, Qt's <a href="containers.html">generic containers</a> can choose appropriate storage methods and algorithms.</p>
<p><i>Flags</i> can be one of the following:</p>
<ul>
<li><code>Q_PRIMITIVE_TYPE</code> specifies that <i>Type</i> is a POD (plain old data) type with no constructor or destructor, or else a type where every bit pattern is a valid object and memcpy() creates a valid independent copy of the object.</li>
<li><code>Q_MOVABLE_TYPE</code> specifies that <i>Type</i> has a constructor and/or a destructor but can be moved in memory using <code>memcpy()</code>. Note: despite the name, this has nothing to do with move constructors or C++ move semantics.</li>
<li><code>Q_COMPLEX_TYPE</code> (the default) specifies that <i>Type</i> has constructors and/or a destructor and that it may not be moved in memory.</li>
</ul>
<p>Example of a &quot;primitive&quot; type:</p>
<pre class="cpp">

  <span class="keyword">struct</span> Point2D
  {
      <span class="type">int</span> x;
      <span class="type">int</span> y;
  };

  Q_DECLARE_TYPEINFO(Point2D<span class="operator">,</span> Q_PRIMITIVE_TYPE);

</pre>
<p>An example of a non-POD &quot;primitive&quot; type is <a href="quuid.html">QUuid</a>: Even though <a href="quuid.html">QUuid</a> has constructors (and therefore isn't POD), every bit pattern still represents a valid object, and memcpy() can be used to create a valid independent copy of a <a href="quuid.html">QUuid</a> object.</p>
<p>Example of a movable type:</p>
<pre class="cpp">

  <span class="keyword">class</span> Point2D
  {
  <span class="keyword">public</span>:
      Point2D() { data <span class="operator">=</span> <span class="keyword">new</span> <span class="type">int</span><span class="operator">[</span><span class="number">2</span><span class="operator">]</span>; }
      Point2D(<span class="keyword">const</span> Point2D <span class="operator">&amp;</span>other) { <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> }
      <span class="operator">~</span>Point2D() { <span class="keyword">delete</span><span class="operator">[</span><span class="operator">]</span> data; }

      Point2D <span class="operator">&amp;</span><span class="keyword">operator</span><span class="operator">=</span>(<span class="keyword">const</span> Point2D <span class="operator">&amp;</span>other) { <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> }

      <span class="type">int</span> x() <span class="keyword">const</span> { <span class="keyword">return</span> data<span class="operator">[</span><span class="number">0</span><span class="operator">]</span>; }
      <span class="type">int</span> y() <span class="keyword">const</span> { <span class="keyword">return</span> data<span class="operator">[</span><span class="number">1</span><span class="operator">]</span>; }

  <span class="keyword">private</span>:
      <span class="type">int</span> <span class="operator">*</span>data;
  };

  Q_DECLARE_TYPEINFO(Point2D<span class="operator">,</span> Q_MOVABLE_TYPE);

</pre>
<!-- @@@Q_DECLARE_TYPEINFO -->
<!-- $$$Q_DECL_CONSTEXPR[overload1]$$$Q_DECL_CONSTEXPR -->
<h3 class="fn" id="Q_DECL_CONSTEXPR"><a name="Q_DECL_CONSTEXPR"></a><span class="name">Q_DECL_CONSTEXPR</span></h3>
<p>This macro can be used to declare variable that should be constructed at compile-time, or an inline function that can be computed at compile-time.</p>
<p>It expands to &quot;constexpr&quot; if your compiler supports that C++11 keyword, or to nothing otherwise.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_RELAXED_CONSTEXPR">Q_DECL_RELAXED_CONSTEXPR</a>.</p>
<!-- @@@Q_DECL_CONSTEXPR -->
<!-- $$$Q_DECL_EXPORT[overload1]$$$Q_DECL_EXPORT -->
<h3 class="fn" id="Q_DECL_EXPORT"><a name="Q_DECL_EXPORT"></a><span class="name">Q_DECL_EXPORT</span></h3>
<p>This macro marks a symbol for shared library export (see Creating Shared Libraries).</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_IMPORT">Q_DECL_IMPORT</a>.</p>
<!-- @@@Q_DECL_EXPORT -->
<!-- $$$Q_DECL_FINAL[overload1]$$$Q_DECL_FINAL -->
<h3 class="fn" id="Q_DECL_FINAL"><a name="Q_DECL_FINAL"></a><span class="name">Q_DECL_FINAL</span></h3>
<p>This macro can be used to declare an overriding virtual or a class as &quot;final&quot;, with Java semantics. Further-derived classes can then no longer override this virtual function, or inherit from this class, respectively.</p>
<p>It expands to &quot;final&quot; if your compiler supports that C++11 contextual keyword, or something non-standard if your compiler supports something close enough to the C++11 semantics, or to nothing otherwise.</p>
<p>The macro goes at the end of the function, usually after the <code>const</code>, if any:</p>
<pre class="cpp">

  <span class="comment">// more-derived classes no longer permitted to override this:</span>
  <span class="keyword">virtual</span> <span class="type">void</span> MyWidget<span class="operator">::</span>paintEvent(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span><span class="operator">*</span>) Q_DECL_FINAL;

</pre>
<p>For classes, it goes in front of the <code>:</code> in the class definition, if any:</p>
<pre class="cpp">

  <span class="keyword">class</span> <span class="type"><a href="qrect.html">QRect</a></span> Q_DECL_FINAL { <span class="comment">// cannot be derived from</span>
      <span class="comment">// ...</span>
  };

</pre>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_OVERRIDE">Q_DECL_OVERRIDE</a>.</p>
<!-- @@@Q_DECL_FINAL -->
<!-- $$$Q_DECL_IMPORT[overload1]$$$Q_DECL_IMPORT -->
<h3 class="fn" id="Q_DECL_IMPORT"><a name="Q_DECL_IMPORT"></a><span class="name">Q_DECL_IMPORT</span></h3>
<p>This macro declares a symbol to be an import from a shared library (see Creating Shared Libraries).</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_EXPORT">Q_DECL_EXPORT</a>.</p>
<!-- @@@Q_DECL_IMPORT -->
<!-- $$$Q_DECL_NOEXCEPT[overload1]$$$Q_DECL_NOEXCEPT -->
<h3 class="fn" id="Q_DECL_NOEXCEPT"><a name="Q_DECL_NOEXCEPT"></a><span class="name">Q_DECL_NOEXCEPT</span></h3>
<p>This macro marks a function as never throwing. If the function does nevertheless throw, the behaviour is defined: std::terminate() is called.</p>
<p>The macro expands to C++11 noexcept, if available, or to nothing otherwise.</p>
<p>If you need the operator version of C++11 noexcept, use <a href="qtglobal.html#Q_DECL_NOEXCEPT_EXPR">Q_DECL_NOEXCEPT_EXPR</a>(x).</p>
<p>If you don't need C++11 noexcept semantics, e.g&#x2e; because your function can't possibly throw, don't use this macro, use <a href="qtglobal.html#Q_DECL_NOTHROW">Q_DECL_NOTHROW</a> instead.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_NOTHROW">Q_DECL_NOTHROW</a> and <a href="qtglobal.html#Q_DECL_NOEXCEPT_EXPR">Q_DECL_NOEXCEPT_EXPR</a>().</p>
<!-- @@@Q_DECL_NOEXCEPT -->
<!-- $$$Q_DECL_NOEXCEPT_EXPR[overload1]$$$Q_DECL_NOEXCEPT_EXPR -->
<h3 class="fn" id="Q_DECL_NOEXCEPT_EXPR"><a name="Q_DECL_NOEXCEPT_EXPR"></a><span class="name">Q_DECL_NOEXCEPT_EXPR</span>(<i>x</i>)</h3>
<p>This macro marks a function as non-throwing if <i>x</i> is <code>true</code>. If the function does nevertheless throw, the behaviour is defined: std::terminate() is called.</p>
<p>The macro expands to C++11 noexcept(x), if available, or to nothing otherwise.</p>
<p>If you need the always-true version of C++11 noexcept, use <a href="qtglobal.html#Q_DECL_NOEXCEPT">Q_DECL_NOEXCEPT</a>.</p>
<p>If you don't need C++11 noexcept semantics, e.g&#x2e; because your function can't possibly throw, don't use this macro, use <a href="qtglobal.html#Q_DECL_NOTHROW">Q_DECL_NOTHROW</a> instead.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_NOTHROW">Q_DECL_NOTHROW</a> and <a href="qtglobal.html#Q_DECL_NOEXCEPT">Q_DECL_NOEXCEPT</a>.</p>
<!-- @@@Q_DECL_NOEXCEPT_EXPR -->
<!-- $$$Q_DECL_NOTHROW[overload1]$$$Q_DECL_NOTHROW -->
<h3 class="fn" id="Q_DECL_NOTHROW"><a name="Q_DECL_NOTHROW"></a><span class="name">Q_DECL_NOTHROW</span></h3>
<p>This macro marks a function as never throwing, under no circumstances. If the function does nevertheless throw, the behaviour is undefined.</p>
<p>The macro expands to either &quot;throw()&quot;, if that has some benefit on the compiler, or to C++11 noexcept, if available, or to nothing otherwise.</p>
<p>If you need C++11 noexcept semantics, don't use this macro, use <a href="qtglobal.html#Q_DECL_NOEXCEPT">Q_DECL_NOEXCEPT</a>/<a href="qtglobal.html#Q_DECL_NOEXCEPT_EXPR">Q_DECL_NOEXCEPT_EXPR</a> instead.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_NOEXCEPT">Q_DECL_NOEXCEPT</a> and <a href="qtglobal.html#Q_DECL_NOEXCEPT_EXPR">Q_DECL_NOEXCEPT_EXPR</a>().</p>
<!-- @@@Q_DECL_NOTHROW -->
<!-- $$$Q_DECL_OVERRIDE[overload1]$$$Q_DECL_OVERRIDE -->
<h3 class="fn" id="Q_DECL_OVERRIDE"><a name="Q_DECL_OVERRIDE"></a><span class="name">Q_DECL_OVERRIDE</span></h3>
<p>This macro can be used to declare an overriding virtual function. Use of this markup will allow the compiler to generate an error if the overriding virtual function does not in fact override anything.</p>
<p>It expands to &quot;override&quot; if your compiler supports that C++11 contextual keyword, or to nothing otherwise.</p>
<p>The macro goes at the end of the function, usually after the <code>const</code>, if any:</p>
<pre class="cpp">

  <span class="comment">// generate error if this doesn't actually override anything:</span>
  <span class="keyword">virtual</span> <span class="type">void</span> MyWidget<span class="operator">::</span>paintEvent(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span><span class="operator">*</span>) Q_DECL_OVERRIDE;

</pre>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_FINAL">Q_DECL_FINAL</a>.</p>
<!-- @@@Q_DECL_OVERRIDE -->
<!-- $$$Q_DECL_RELAXED_CONSTEXPR[overload1]$$$Q_DECL_RELAXED_CONSTEXPR -->
<h3 class="fn" id="Q_DECL_RELAXED_CONSTEXPR"><a name="Q_DECL_RELAXED_CONSTEXPR"></a><span class="name">Q_DECL_RELAXED_CONSTEXPR</span></h3>
<p>This macro can be used to declare an inline function that can be computed at compile-time according to the relaxed rules from C++14.</p>
<p>It expands to &quot;constexpr&quot; if your compiler supports C++14 relaxed constant expressions, or to nothing otherwise.</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_CONSTEXPR">Q_DECL_CONSTEXPR</a>.</p>
<!-- @@@Q_DECL_RELAXED_CONSTEXPR -->
<!-- $$$Q_FALLTHROUGH[overload1]$$$Q_FALLTHROUGH -->
<h3 class="fn" id="Q_FALLTHROUGH"><a name="Q_FALLTHROUGH"></a><span class="type">void</span> <span class="name">Q_FALLTHROUGH</span>()</h3>
<p>Can be used in switch statements at the end of case block to tell the compiler and other developers that that the lack of a break statement is intentional.</p>
<p>This is useful since a missing break statement is often a bug, and some compilers can be configured to emit warnings when one is not found.</p>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qtglobal.html#Q_UNREACHABLE">Q_UNREACHABLE</a>().</p>
<!-- @@@Q_FALLTHROUGH -->
<!-- $$$Q_FOREACH[overload1]$$$Q_FOREACH -->
<h3 class="fn" id="Q_FOREACH"><a name="Q_FOREACH"></a><span class="name">Q_FOREACH</span>(<i>variable</i>, <i>container</i>)</h3>
<p>Same as foreach(<i>variable</i>, <i>container</i>).</p>
<p>This macro is available even when <code>no_keywords</code> is specified using the <code>.pro</code> file's <code>CONFIG</code> variable.</p>
<p><b>Note: </b>Since Qt 5.7, the use of this macro is discouraged. It will be removed in a future version of Qt. Please use C++11 range-for, possibly with <a href="qtglobal.html#qAsConst">qAsConst</a>(), as needed.</p><p><b>See also </b><a href="qtglobal.html#qAsConst">qAsConst</a>().</p>
<!-- @@@Q_FOREACH -->
<!-- $$$Q_FOREVER[overload1]$$$Q_FOREVER -->
<h3 class="fn" id="Q_FOREVER"><a name="Q_FOREVER"></a><span class="name">Q_FOREVER</span></h3>
<p>Same as <a href="qtglobal.html#forever">forever</a>.</p>
<p>This macro is available even when <code>no_keywords</code> is specified using the <code>.pro</code> file's <code>CONFIG</code> variable.</p>
<p><b>See also </b><a href="qtglobal.html#foreach">foreach</a>().</p>
<!-- @@@Q_FOREVER -->
<!-- $$$Q_FORWARD_DECLARE_CF_TYPE[overload1]$$$Q_FORWARD_DECLARE_CF_TYPE -->
<h3 class="fn" id="Q_FORWARD_DECLARE_CF_TYPE"><a name="Q_FORWARD_DECLARE_CF_TYPE"></a><span class="name">Q_FORWARD_DECLARE_CF_TYPE</span>(<i>type</i>)</h3>
<p>Forward-declares a Core Foundation <i>type</i>. This includes the actual type and the ref type. For example, Q_FORWARD_DECLARE_CF_TYPE(CFString) declares __CFString and CFStringRef.</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@Q_FORWARD_DECLARE_CF_TYPE -->
<!-- $$$Q_FORWARD_DECLARE_MUTABLE_CF_TYPE[overload1]$$$Q_FORWARD_DECLARE_MUTABLE_CF_TYPE -->
<h3 class="fn" id="Q_FORWARD_DECLARE_MUTABLE_CF_TYPE"><a name="Q_FORWARD_DECLARE_MUTABLE_CF_TYPE"></a><span class="name">Q_FORWARD_DECLARE_MUTABLE_CF_TYPE</span>(<i>type</i>)</h3>
<p>Forward-declares a mutable Core Foundation <i>type</i>. This includes the actual type and the ref type. For example, Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString) declares __CFMutableString and CFMutableStringRef.</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@Q_FORWARD_DECLARE_MUTABLE_CF_TYPE -->
<!-- $$$Q_FORWARD_DECLARE_OBJC_CLASS[overload1]$$$Q_FORWARD_DECLARE_OBJC_CLASS -->
<h3 class="fn" id="Q_FORWARD_DECLARE_OBJC_CLASS"><a name="Q_FORWARD_DECLARE_OBJC_CLASS"></a><span class="name">Q_FORWARD_DECLARE_OBJC_CLASS</span>(<i>classname</i>)</h3>
<p>Forward-declares an Objective-C <i>classname</i> in a manner such that it can be compiled as either Objective-C or C++.</p>
<p>This is primarily intended for use in header files that may be included by both Objective-C and C++ source files.</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@Q_FORWARD_DECLARE_OBJC_CLASS -->
<!-- $$$Q_FUNC_INFO[overload1]$$$Q_FUNC_INFO -->
<h3 class="fn" id="Q_FUNC_INFO"><a name="Q_FUNC_INFO"></a>const <span class="type">char</span> *<span class="name">Q_FUNC_INFO</span>()</h3>
<p>Expands to a string that describe the function the macro resides in. How this string looks more specifically is compiler dependent. With GNU GCC it is typically the function signature, while with other compilers it might be the line and column number.</p>
<p>Q_FUNC_INFO can be conveniently used with <a href="qtglobal.html#qDebug">qDebug</a>(). For example, this function:</p>
<pre class="cpp">

  <span class="keyword">template</span><span class="operator">&lt;</span><span class="keyword">typename</span> TInputType<span class="operator">&gt;</span>
  <span class="keyword">const</span> TInputType <span class="operator">&amp;</span>myMin(<span class="keyword">const</span> TInputType <span class="operator">&amp;</span>value1<span class="operator">,</span> <span class="keyword">const</span> TInputType <span class="operator">&amp;</span>value2)
  {
      <a href="qtglobal.html#qDebug">qDebug</a>() <span class="operator">&lt;</span><span class="operator">&lt;</span> Q_FUNC_INFO <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;was called with value1:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> value1 <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;value2:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> value2;

      <span class="keyword">if</span>(value1 <span class="operator">&lt;</span> value2)
          <span class="keyword">return</span> value1;
      <span class="keyword">else</span>
          <span class="keyword">return</span> value2;
  }

</pre>
<p>when instantiated with the integer type, will with the GCC compiler produce:</p>
<p><code>const TInputType&amp; myMin(const TInputType&amp;, const TInputType&amp;) [with TInputType = int] was called with value1: 3 value2: 4</code></p>
<p>If this macro is used outside a function, the behavior is undefined.</p>
<!-- @@@Q_FUNC_INFO -->
<!-- $$$Q_INT64_C[overload1]$$$Q_INT64_C -->
<h3 class="fn" id="Q_INT64_C"><a name="Q_INT64_C"></a><span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> <span class="name">Q_INT64_C</span>(<i>literal</i>)</h3>
<p>Wraps the signed 64-bit integer <i>literal</i> in a platform-independent way.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> value <span class="operator">=</span> Q_INT64_C(<span class="number">932838457459459</span>);

</pre>
<p><b>See also </b><a href="qtglobal.html#qint64-typedef">qint64</a> and <a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a>().</p>
<!-- @@@Q_INT64_C -->
<!-- $$$Q_LIKELY[overload1]$$$Q_LIKELY -->
<h3 class="fn" id="Q_LIKELY"><a name="Q_LIKELY"></a><span class="name">Q_LIKELY</span>(<i>expr</i>)</h3>
<p>Hints to the compiler that the enclosed condition, <i>expr</i>, is likely to evaluate to <code>true</code>.</p>
<p>Use of this macro can help the compiler to optimize the code.</p>
<p>Example:</p>
<pre class="cpp">

      <span class="comment">// the condition inside the &quot;if&quot; will be successful most of the times</span>
      <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">1</span>; i <span class="operator">&lt;</span><span class="operator">=</span> <span class="number">365</span>; i<span class="operator">+</span><span class="operator">+</span>) {
          <span class="keyword">if</span> (Q_LIKELY(isWorkingDay(i))) {
              <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
          }
          <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      }

</pre>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qtglobal.html#Q_UNLIKELY">Q_UNLIKELY</a>().</p>
<!-- @@@Q_LIKELY -->
<!-- $$$Q_LITTLE_ENDIAN[overload1]$$$Q_LITTLE_ENDIAN -->
<h3 class="fn" id="Q_LITTLE_ENDIAN"><a name="Q_LITTLE_ENDIAN"></a><span class="name">Q_LITTLE_ENDIAN</span></h3>
<p>This macro represents a value you can compare to the macro <a href="qtglobal.html#Q_BYTE_ORDER">Q_BYTE_ORDER</a> to determine the endian-ness of your system. In a little-endian system, the least significant byte is stored at the lowest address. The other bytes follow in increasing order of significance.</p>
<pre class="cpp">

  <span class="preprocessor">#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN</span>
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  <span class="preprocessor">#endif</span>

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_BYTE_ORDER">Q_BYTE_ORDER</a> and <a href="qtglobal.html#Q_BIG_ENDIAN">Q_BIG_ENDIAN</a>.</p>
<!-- @@@Q_LITTLE_ENDIAN -->
<!-- $$$Q_OS_AIX[overload1]$$$Q_OS_AIX -->
<h3 class="fn" id="Q_OS_AIX"><a name="Q_OS_AIX"></a><span class="name">Q_OS_AIX</span></h3>
<p>Defined on AIX.</p>
<!-- @@@Q_OS_AIX -->
<!-- $$$Q_OS_ANDROID[overload1]$$$Q_OS_ANDROID -->
<h3 class="fn" id="Q_OS_ANDROID"><a name="Q_OS_ANDROID"></a><span class="name">Q_OS_ANDROID</span></h3>
<p>Defined on Android.</p>
<!-- @@@Q_OS_ANDROID -->
<!-- $$$Q_OS_BSD4[overload1]$$$Q_OS_BSD4 -->
<h3 class="fn" id="Q_OS_BSD4"><a name="Q_OS_BSD4"></a><span class="name">Q_OS_BSD4</span></h3>
<p>Defined on Any BSD 4.4 system.</p>
<!-- @@@Q_OS_BSD4 -->
<!-- $$$Q_OS_BSDI[overload1]$$$Q_OS_BSDI -->
<h3 class="fn" id="Q_OS_BSDI"><a name="Q_OS_BSDI"></a><span class="name">Q_OS_BSDI</span></h3>
<p>Defined on BSD/OS.</p>
<!-- @@@Q_OS_BSDI -->
<!-- $$$Q_OS_CYGWIN[overload1]$$$Q_OS_CYGWIN -->
<h3 class="fn" id="Q_OS_CYGWIN"><a name="Q_OS_CYGWIN"></a><span class="name">Q_OS_CYGWIN</span></h3>
<p>Defined on Cygwin.</p>
<!-- @@@Q_OS_CYGWIN -->
<!-- $$$Q_OS_DARWIN[overload1]$$$Q_OS_DARWIN -->
<h3 class="fn" id="Q_OS_DARWIN"><a name="Q_OS_DARWIN"></a><span class="name">Q_OS_DARWIN</span></h3>
<p>Defined on Darwin-based operating systems such as macOS, iOS, watchOS, and tvOS.</p>
<!-- @@@Q_OS_DARWIN -->
<!-- $$$Q_OS_DGUX[overload1]$$$Q_OS_DGUX -->
<h3 class="fn" id="Q_OS_DGUX"><a name="Q_OS_DGUX"></a><span class="name">Q_OS_DGUX</span></h3>
<p>Defined on DG/UX.</p>
<!-- @@@Q_OS_DGUX -->
<!-- $$$Q_OS_DYNIX[overload1]$$$Q_OS_DYNIX -->
<h3 class="fn" id="Q_OS_DYNIX"><a name="Q_OS_DYNIX"></a><span class="name">Q_OS_DYNIX</span></h3>
<p>Defined on DYNIX/ptx.</p>
<!-- @@@Q_OS_DYNIX -->
<!-- $$$Q_OS_FREEBSD[overload1]$$$Q_OS_FREEBSD -->
<h3 class="fn" id="Q_OS_FREEBSD"><a name="Q_OS_FREEBSD"></a><span class="name">Q_OS_FREEBSD</span></h3>
<p>Defined on <a href="qtcore-attribution-freebsd.html#freebsd">FreeBSD</a>.</p>
<!-- @@@Q_OS_FREEBSD -->
<!-- $$$Q_OS_HPUX[overload1]$$$Q_OS_HPUX -->
<h3 class="fn" id="Q_OS_HPUX"><a name="Q_OS_HPUX"></a><span class="name">Q_OS_HPUX</span></h3>
<p>Defined on HP-UX.</p>
<!-- @@@Q_OS_HPUX -->
<!-- $$$Q_OS_HURD[overload1]$$$Q_OS_HURD -->
<h3 class="fn" id="Q_OS_HURD"><a name="Q_OS_HURD"></a><span class="name">Q_OS_HURD</span></h3>
<p>Defined on GNU Hurd.</p>
<!-- @@@Q_OS_HURD -->
<!-- $$$Q_OS_IOS[overload1]$$$Q_OS_IOS -->
<h3 class="fn" id="Q_OS_IOS"><a name="Q_OS_IOS"></a><span class="name">Q_OS_IOS</span></h3>
<p>Defined on iOS.</p>
<!-- @@@Q_OS_IOS -->
<!-- $$$Q_OS_IRIX[overload1]$$$Q_OS_IRIX -->
<h3 class="fn" id="Q_OS_IRIX"><a name="Q_OS_IRIX"></a><span class="name">Q_OS_IRIX</span></h3>
<p>Defined on SGI Irix.</p>
<!-- @@@Q_OS_IRIX -->
<!-- $$$Q_OS_LINUX[overload1]$$$Q_OS_LINUX -->
<h3 class="fn" id="Q_OS_LINUX"><a name="Q_OS_LINUX"></a><span class="name">Q_OS_LINUX</span></h3>
<p>Defined on Linux.</p>
<!-- @@@Q_OS_LINUX -->
<!-- $$$Q_OS_LYNX[overload1]$$$Q_OS_LYNX -->
<h3 class="fn" id="Q_OS_LYNX"><a name="Q_OS_LYNX"></a><span class="name">Q_OS_LYNX</span></h3>
<p>Defined on LynxOS.</p>
<!-- @@@Q_OS_LYNX -->
<!-- $$$Q_OS_MAC[overload1]$$$Q_OS_MAC -->
<h3 class="fn" id="Q_OS_MAC"><a name="Q_OS_MAC"></a><span class="name">Q_OS_MAC</span></h3>
<p>Deprecated synonym for <code>Q_OS_DARWIN</code>. Do not use.</p>
<!-- @@@Q_OS_MAC -->
<!-- $$$Q_OS_MACOS[overload1]$$$Q_OS_MACOS -->
<h3 class="fn" id="Q_OS_MACOS"><a name="Q_OS_MACOS"></a><span class="name">Q_OS_MACOS</span></h3>
<p>Defined on macOS.</p>
<!-- @@@Q_OS_MACOS -->
<!-- $$$Q_OS_NETBSD[overload1]$$$Q_OS_NETBSD -->
<h3 class="fn" id="Q_OS_NETBSD"><a name="Q_OS_NETBSD"></a><span class="name">Q_OS_NETBSD</span></h3>
<p>Defined on NetBSD.</p>
<!-- @@@Q_OS_NETBSD -->
<!-- $$$Q_OS_OPENBSD[overload1]$$$Q_OS_OPENBSD -->
<h3 class="fn" id="Q_OS_OPENBSD"><a name="Q_OS_OPENBSD"></a><span class="name">Q_OS_OPENBSD</span></h3>
<p>Defined on OpenBSD.</p>
<!-- @@@Q_OS_OPENBSD -->
<!-- $$$Q_OS_OSF[overload1]$$$Q_OS_OSF -->
<h3 class="fn" id="Q_OS_OSF"><a name="Q_OS_OSF"></a><span class="name">Q_OS_OSF</span></h3>
<p>Defined on HP Tru64 UNIX.</p>
<!-- @@@Q_OS_OSF -->
<!-- $$$Q_OS_OSX[overload1]$$$Q_OS_OSX -->
<h3 class="fn" id="Q_OS_OSX"><a name="Q_OS_OSX"></a><span class="name">Q_OS_OSX</span></h3>
<p>Deprecated synonym for <code>Q_OS_MACOS</code>. Do not use.</p>
<!-- @@@Q_OS_OSX -->
<!-- $$$Q_OS_QNX[overload1]$$$Q_OS_QNX -->
<h3 class="fn" id="Q_OS_QNX"><a name="Q_OS_QNX"></a><span class="name">Q_OS_QNX</span></h3>
<p>Defined on QNX Neutrino.</p>
<!-- @@@Q_OS_QNX -->
<!-- $$$Q_OS_RELIANT[overload1]$$$Q_OS_RELIANT -->
<h3 class="fn" id="Q_OS_RELIANT"><a name="Q_OS_RELIANT"></a><span class="name">Q_OS_RELIANT</span></h3>
<p>Defined on Reliant UNIX.</p>
<!-- @@@Q_OS_RELIANT -->
<!-- $$$Q_OS_SCO[overload1]$$$Q_OS_SCO -->
<h3 class="fn" id="Q_OS_SCO"><a name="Q_OS_SCO"></a><span class="name">Q_OS_SCO</span></h3>
<p>Defined on SCO OpenServer 5.</p>
<!-- @@@Q_OS_SCO -->
<!-- $$$Q_OS_SOLARIS[overload1]$$$Q_OS_SOLARIS -->
<h3 class="fn" id="Q_OS_SOLARIS"><a name="Q_OS_SOLARIS"></a><span class="name">Q_OS_SOLARIS</span></h3>
<p>Defined on Sun Solaris.</p>
<!-- @@@Q_OS_SOLARIS -->
<!-- $$$Q_OS_TVOS[overload1]$$$Q_OS_TVOS -->
<h3 class="fn" id="Q_OS_TVOS"><a name="Q_OS_TVOS"></a><span class="name">Q_OS_TVOS</span></h3>
<p>Defined on tvOS.</p>
<!-- @@@Q_OS_TVOS -->
<!-- $$$Q_OS_ULTRIX[overload1]$$$Q_OS_ULTRIX -->
<h3 class="fn" id="Q_OS_ULTRIX"><a name="Q_OS_ULTRIX"></a><span class="name">Q_OS_ULTRIX</span></h3>
<p>Defined on DEC Ultrix.</p>
<!-- @@@Q_OS_ULTRIX -->
<!-- $$$Q_OS_UNIX[overload1]$$$Q_OS_UNIX -->
<h3 class="fn" id="Q_OS_UNIX"><a name="Q_OS_UNIX"></a><span class="name">Q_OS_UNIX</span></h3>
<p>Defined on Any UNIX BSD/SYSV system.</p>
<!-- @@@Q_OS_UNIX -->
<!-- $$$Q_OS_UNIXWARE[overload1]$$$Q_OS_UNIXWARE -->
<h3 class="fn" id="Q_OS_UNIXWARE"><a name="Q_OS_UNIXWARE"></a><span class="name">Q_OS_UNIXWARE</span></h3>
<p>Defined on UnixWare 7, Open UNIX 8.</p>
<!-- @@@Q_OS_UNIXWARE -->
<!-- $$$Q_OS_WATCHOS[overload1]$$$Q_OS_WATCHOS -->
<h3 class="fn" id="Q_OS_WATCHOS"><a name="Q_OS_WATCHOS"></a><span class="name">Q_OS_WATCHOS</span></h3>
<p>Defined on watchOS.</p>
<!-- @@@Q_OS_WATCHOS -->
<!-- $$$Q_OS_WIN32[overload1]$$$Q_OS_WIN32 -->
<h3 class="fn" id="Q_OS_WIN32"><a name="Q_OS_WIN32"></a><span class="name">Q_OS_WIN32</span></h3>
<p>Defined on 32-bit and 64-bit versions of Windows.</p>
<!-- @@@Q_OS_WIN32 -->
<!-- $$$Q_OS_WIN64[overload1]$$$Q_OS_WIN64 -->
<h3 class="fn" id="Q_OS_WIN64"><a name="Q_OS_WIN64"></a><span class="name">Q_OS_WIN64</span></h3>
<p>Defined on 64-bit versions of Windows.</p>
<!-- @@@Q_OS_WIN64 -->
<!-- $$$Q_OS_WIN[overload1]$$$Q_OS_WIN -->
<h3 class="fn" id="Q_OS_WIN"><a name="Q_OS_WIN"></a><span class="name">Q_OS_WIN</span></h3>
<p>Defined on all supported versions of Windows. That is, if <a href="qtglobal.html#Q_OS_WIN32">Q_OS_WIN32</a>, <a href="qtglobal.html#Q_OS_WIN64">Q_OS_WIN64</a>, or <a href="qtglobal.html#Q_OS_WINRT">Q_OS_WINRT</a> is defined.</p>
<!-- @@@Q_OS_WIN -->
<!-- $$$Q_OS_WINRT[overload1]$$$Q_OS_WINRT -->
<h3 class="fn" id="Q_OS_WINRT"><a name="Q_OS_WINRT"></a><span class="name">Q_OS_WINRT</span></h3>
<p>Defined for Windows Runtime (Windows Store apps) on Windows 8, Windows RT, and Windows Phone 8.</p>
<!-- @@@Q_OS_WINRT -->
<!-- $$$Q_PROCESSOR_X86[overload1]$$$Q_PROCESSOR_X86 -->
<h3 class="fn" id="Q_PROCESSOR_X86"><a name="Q_PROCESSOR_X86"></a><span class="name">Q_PROCESSOR_X86</span></h3>
<p>Defined if the application is compiled for x86 processors. Qt currently supports two x86 variants: <a href="qtglobal.html#Q_PROCESSOR_X86_32">Q_PROCESSOR_X86_32</a> and <a href="qtglobal.html#Q_PROCESSOR_X86_64">Q_PROCESSOR_X86_64</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_X86 -->
<!-- $$$Q_PROCESSOR_S390[overload1]$$$Q_PROCESSOR_S390 -->
<h3 class="fn" id="Q_PROCESSOR_S390"><a name="Q_PROCESSOR_S390"></a><span class="name">Q_PROCESSOR_S390</span></h3>
<p>Defined if the application is compiled for S/390 processors. Qt supports one optional variant of S/390: <a href="qtglobal.html#Q_PROCESSOR_S390_X">Q_PROCESSOR_S390_X</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_S390 -->
<!-- $$$Q_PROCESSOR_ALPHA[overload1]$$$Q_PROCESSOR_ALPHA -->
<h3 class="fn" id="Q_PROCESSOR_ALPHA"><a name="Q_PROCESSOR_ALPHA"></a><span class="name">Q_PROCESSOR_ALPHA</span></h3>
<p>Defined if the application is compiled for Alpha processors.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_ALPHA -->
<!-- $$$Q_PROCESSOR_ARM[overload1]$$$Q_PROCESSOR_ARM -->
<h3 class="fn" id="Q_PROCESSOR_ARM"><a name="Q_PROCESSOR_ARM"></a><span class="name">Q_PROCESSOR_ARM</span></h3>
<p>Defined if the application is compiled for ARM processors. Qt currently supports three optional ARM revisions: <a href="qtglobal.html#Q_PROCESSOR_ARM_V5">Q_PROCESSOR_ARM_V5</a>, <a href="qtglobal.html#Q_PROCESSOR_ARM_V6">Q_PROCESSOR_ARM_V6</a>, and <a href="qtglobal.html#Q_PROCESSOR_ARM_V7">Q_PROCESSOR_ARM_V7</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_ARM -->
<!-- $$$Q_PROCESSOR_ARM_V5[overload1]$$$Q_PROCESSOR_ARM_V5 -->
<h3 class="fn" id="Q_PROCESSOR_ARM_V5"><a name="Q_PROCESSOR_ARM_V5"></a><span class="name">Q_PROCESSOR_ARM_V5</span></h3>
<p>Defined if the application is compiled for ARMv5 processors. The <a href="qtglobal.html#Q_PROCESSOR_ARM">Q_PROCESSOR_ARM</a> macro is also defined when Q_PROCESSOR_ARM_V5 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_ARM_V5 -->
<!-- $$$Q_PROCESSOR_ARM_V6[overload1]$$$Q_PROCESSOR_ARM_V6 -->
<h3 class="fn" id="Q_PROCESSOR_ARM_V6"><a name="Q_PROCESSOR_ARM_V6"></a><span class="name">Q_PROCESSOR_ARM_V6</span></h3>
<p>Defined if the application is compiled for ARMv6 processors. The <a href="qtglobal.html#Q_PROCESSOR_ARM">Q_PROCESSOR_ARM</a> and <a href="qtglobal.html#Q_PROCESSOR_ARM_V5">Q_PROCESSOR_ARM_V5</a> macros are also defined when Q_PROCESSOR_ARM_V6 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_ARM_V6 -->
<!-- $$$Q_PROCESSOR_ARM_V7[overload1]$$$Q_PROCESSOR_ARM_V7 -->
<h3 class="fn" id="Q_PROCESSOR_ARM_V7"><a name="Q_PROCESSOR_ARM_V7"></a><span class="name">Q_PROCESSOR_ARM_V7</span></h3>
<p>Defined if the application is compiled for ARMv7 processors. The <a href="qtglobal.html#Q_PROCESSOR_ARM">Q_PROCESSOR_ARM</a>, <a href="qtglobal.html#Q_PROCESSOR_ARM_V5">Q_PROCESSOR_ARM_V5</a>, and <a href="qtglobal.html#Q_PROCESSOR_ARM_V6">Q_PROCESSOR_ARM_V6</a> macros are also defined when Q_PROCESSOR_ARM_V7 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_ARM_V7 -->
<!-- $$$Q_PROCESSOR_AVR32[overload1]$$$Q_PROCESSOR_AVR32 -->
<h3 class="fn" id="Q_PROCESSOR_AVR32"><a name="Q_PROCESSOR_AVR32"></a><span class="name">Q_PROCESSOR_AVR32</span></h3>
<p>Defined if the application is compiled for AVR32 processors.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_AVR32 -->
<!-- $$$Q_PROCESSOR_BLACKFIN[overload1]$$$Q_PROCESSOR_BLACKFIN -->
<h3 class="fn" id="Q_PROCESSOR_BLACKFIN"><a name="Q_PROCESSOR_BLACKFIN"></a><span class="name">Q_PROCESSOR_BLACKFIN</span></h3>
<p>Defined if the application is compiled for Blackfin processors.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_BLACKFIN -->
<!-- $$$Q_PROCESSOR_IA64[overload1]$$$Q_PROCESSOR_IA64 -->
<h3 class="fn" id="Q_PROCESSOR_IA64"><a name="Q_PROCESSOR_IA64"></a><span class="name">Q_PROCESSOR_IA64</span></h3>
<p>Defined if the application is compiled for IA-64 processors. This includes all Itanium and Itanium 2 processors.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_IA64 -->
<!-- $$$Q_PROCESSOR_MIPS[overload1]$$$Q_PROCESSOR_MIPS -->
<h3 class="fn" id="Q_PROCESSOR_MIPS"><a name="Q_PROCESSOR_MIPS"></a><span class="name">Q_PROCESSOR_MIPS</span></h3>
<p>Defined if the application is compiled for MIPS processors. Qt currently supports seven MIPS revisions: <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_III">Q_PROCESSOR_MIPS_III</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_IV">Q_PROCESSOR_MIPS_IV</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_V">Q_PROCESSOR_MIPS_V</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_32">Q_PROCESSOR_MIPS_32</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_64">Q_PROCESSOR_MIPS_64</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS -->
<!-- $$$Q_PROCESSOR_MIPS_32[overload1]$$$Q_PROCESSOR_MIPS_32 -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_32"><a name="Q_PROCESSOR_MIPS_32"></a><span class="name">Q_PROCESSOR_MIPS_32</span></h3>
<p>Defined if the application is compiled for MIPS32 processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a> macros are also defined when Q_PROCESSOR_MIPS_32 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_32 -->
<!-- $$$Q_PROCESSOR_MIPS_64[overload1]$$$Q_PROCESSOR_MIPS_64 -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_64"><a name="Q_PROCESSOR_MIPS_64"></a><span class="name">Q_PROCESSOR_MIPS_64</span></h3>
<p>Defined if the application is compiled for MIPS64 processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_III">Q_PROCESSOR_MIPS_III</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_IV">Q_PROCESSOR_MIPS_IV</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_V">Q_PROCESSOR_MIPS_V</a> macros are also defined when Q_PROCESSOR_MIPS_64 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_64 -->
<!-- $$$Q_PROCESSOR_MIPS_I[overload1]$$$Q_PROCESSOR_MIPS_I -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_I"><a name="Q_PROCESSOR_MIPS_I"></a><span class="name">Q_PROCESSOR_MIPS_I</span></h3>
<p>Defined if the application is compiled for MIPS-I processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a> macro is also defined when Q_PROCESSOR_MIPS_I is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_I -->
<!-- $$$Q_PROCESSOR_MIPS_II[overload1]$$$Q_PROCESSOR_MIPS_II -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_II"><a name="Q_PROCESSOR_MIPS_II"></a><span class="name">Q_PROCESSOR_MIPS_II</span></h3>
<p>Defined if the application is compiled for MIPS-II processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a> and <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a> macros are also defined when Q_PROCESSOR_MIPS_II is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_II -->
<!-- $$$Q_PROCESSOR_MIPS_III[overload1]$$$Q_PROCESSOR_MIPS_III -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_III"><a name="Q_PROCESSOR_MIPS_III"></a><span class="name">Q_PROCESSOR_MIPS_III</span></h3>
<p>Defined if the application is compiled for MIPS-III processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a> macros are also defined when Q_PROCESSOR_MIPS_III is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_III -->
<!-- $$$Q_PROCESSOR_MIPS_IV[overload1]$$$Q_PROCESSOR_MIPS_IV -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_IV"><a name="Q_PROCESSOR_MIPS_IV"></a><span class="name">Q_PROCESSOR_MIPS_IV</span></h3>
<p>Defined if the application is compiled for MIPS-IV processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_III">Q_PROCESSOR_MIPS_III</a> macros are also defined when Q_PROCESSOR_MIPS_IV is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_IV -->
<!-- $$$Q_PROCESSOR_MIPS_V[overload1]$$$Q_PROCESSOR_MIPS_V -->
<h3 class="fn" id="Q_PROCESSOR_MIPS_V"><a name="Q_PROCESSOR_MIPS_V"></a><span class="name">Q_PROCESSOR_MIPS_V</span></h3>
<p>Defined if the application is compiled for MIPS-V processors. The <a href="qtglobal.html#Q_PROCESSOR_MIPS">Q_PROCESSOR_MIPS</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_I">Q_PROCESSOR_MIPS_I</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_II">Q_PROCESSOR_MIPS_II</a>, <a href="qtglobal.html#Q_PROCESSOR_MIPS_III">Q_PROCESSOR_MIPS_III</a>, and <a href="qtglobal.html#Q_PROCESSOR_MIPS_IV">Q_PROCESSOR_MIPS_IV</a> macros are also defined when Q_PROCESSOR_MIPS_V is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_MIPS_V -->
<!-- $$$Q_PROCESSOR_POWER[overload1]$$$Q_PROCESSOR_POWER -->
<h3 class="fn" id="Q_PROCESSOR_POWER"><a name="Q_PROCESSOR_POWER"></a><span class="name">Q_PROCESSOR_POWER</span></h3>
<p>Defined if the application is compiled for POWER processors. Qt currently supports two Power variants: <a href="qtglobal.html#Q_PROCESSOR_POWER_32">Q_PROCESSOR_POWER_32</a> and <a href="qtglobal.html#Q_PROCESSOR_POWER_64">Q_PROCESSOR_POWER_64</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_POWER -->
<!-- $$$Q_PROCESSOR_POWER_32[overload1]$$$Q_PROCESSOR_POWER_32 -->
<h3 class="fn" id="Q_PROCESSOR_POWER_32"><a name="Q_PROCESSOR_POWER_32"></a><span class="name">Q_PROCESSOR_POWER_32</span></h3>
<p>Defined if the application is compiled for 32-bit Power processors. The <a href="qtglobal.html#Q_PROCESSOR_POWER">Q_PROCESSOR_POWER</a> macro is also defined when Q_PROCESSOR_POWER_32 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_POWER_32 -->
<!-- $$$Q_PROCESSOR_POWER_64[overload1]$$$Q_PROCESSOR_POWER_64 -->
<h3 class="fn" id="Q_PROCESSOR_POWER_64"><a name="Q_PROCESSOR_POWER_64"></a><span class="name">Q_PROCESSOR_POWER_64</span></h3>
<p>Defined if the application is compiled for 64-bit Power processors. The <a href="qtglobal.html#Q_PROCESSOR_POWER">Q_PROCESSOR_POWER</a> macro is also defined when Q_PROCESSOR_POWER_64 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_POWER_64 -->
<!-- $$$Q_PROCESSOR_S390_X[overload1]$$$Q_PROCESSOR_S390_X -->
<h3 class="fn" id="Q_PROCESSOR_S390_X"><a name="Q_PROCESSOR_S390_X"></a><span class="name">Q_PROCESSOR_S390_X</span></h3>
<p>Defined if the application is compiled for S/390x processors. The <a href="qtglobal.html#Q_PROCESSOR_S390">Q_PROCESSOR_S390</a> macro is also defined when Q_PROCESSOR_S390_X is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_S390_X -->
<!-- $$$Q_PROCESSOR_SH[overload1]$$$Q_PROCESSOR_SH -->
<h3 class="fn" id="Q_PROCESSOR_SH"><a name="Q_PROCESSOR_SH"></a><span class="name">Q_PROCESSOR_SH</span></h3>
<p>Defined if the application is compiled for SuperH processors. Qt currently supports one SuperH revision: <a href="qtglobal.html#Q_PROCESSOR_SH_4A">Q_PROCESSOR_SH_4A</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_SH -->
<!-- $$$Q_PROCESSOR_SH_4A[overload1]$$$Q_PROCESSOR_SH_4A -->
<h3 class="fn" id="Q_PROCESSOR_SH_4A"><a name="Q_PROCESSOR_SH_4A"></a><span class="name">Q_PROCESSOR_SH_4A</span></h3>
<p>Defined if the application is compiled for SuperH 4A processors. The <a href="qtglobal.html#Q_PROCESSOR_SH">Q_PROCESSOR_SH</a> macro is also defined when Q_PROCESSOR_SH_4A is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_SH_4A -->
<!-- $$$Q_PROCESSOR_SPARC[overload1]$$$Q_PROCESSOR_SPARC -->
<h3 class="fn" id="Q_PROCESSOR_SPARC"><a name="Q_PROCESSOR_SPARC"></a><span class="name">Q_PROCESSOR_SPARC</span></h3>
<p>Defined if the application is compiled for SPARC processors. Qt currently supports one optional SPARC revision: <a href="qtglobal.html#Q_PROCESSOR_SPARC_V9">Q_PROCESSOR_SPARC_V9</a>.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_SPARC -->
<!-- $$$Q_PROCESSOR_SPARC_V9[overload1]$$$Q_PROCESSOR_SPARC_V9 -->
<h3 class="fn" id="Q_PROCESSOR_SPARC_V9"><a name="Q_PROCESSOR_SPARC_V9"></a><span class="name">Q_PROCESSOR_SPARC_V9</span></h3>
<p>Defined if the application is compiled for SPARC V9 processors. The <a href="qtglobal.html#Q_PROCESSOR_SPARC">Q_PROCESSOR_SPARC</a> macro is also defined when Q_PROCESSOR_SPARC_V9 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_SPARC_V9 -->
<!-- $$$Q_PROCESSOR_X86_32[overload1]$$$Q_PROCESSOR_X86_32 -->
<h3 class="fn" id="Q_PROCESSOR_X86_32"><a name="Q_PROCESSOR_X86_32"></a><span class="name">Q_PROCESSOR_X86_32</span></h3>
<p>Defined if the application is compiled for 32-bit x86 processors. This includes all i386, i486, i586, and i686 processors. The <a href="qtglobal.html#Q_PROCESSOR_X86">Q_PROCESSOR_X86</a> macro is also defined when Q_PROCESSOR_X86_32 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_X86_32 -->
<!-- $$$Q_PROCESSOR_X86_64[overload1]$$$Q_PROCESSOR_X86_64 -->
<h3 class="fn" id="Q_PROCESSOR_X86_64"><a name="Q_PROCESSOR_X86_64"></a><span class="name">Q_PROCESSOR_X86_64</span></h3>
<p>Defined if the application is compiled for 64-bit x86 processors. This includes all AMD64, Intel 64, and other x86_64/x64 processors. The <a href="qtglobal.html#Q_PROCESSOR_X86">Q_PROCESSOR_X86</a> macro is also defined when Q_PROCESSOR_X86_64 is defined.</p>
<p><b>See also </b><a href="qsysinfo.html#buildCpuArchitecture">QSysInfo::buildCpuArchitecture</a>().</p>
<!-- @@@Q_PROCESSOR_X86_64 -->
<!-- $$$Q_UINT64_C[overload1]$$$Q_UINT64_C -->
<h3 class="fn" id="Q_UINT64_C"><a name="Q_UINT64_C"></a><span class="type"><a href="qtglobal.html#quint64-typedef">quint64</a></span> <span class="name">Q_UINT64_C</span>(<i>literal</i>)</h3>
<p>Wraps the unsigned 64-bit integer <i>literal</i> in a platform-independent way.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type"><a href="qtglobal.html#quint64-typedef">quint64</a></span> value <span class="operator">=</span> Q_UINT64_C(<span class="number">932838457459459</span>);

</pre>
<p><b>See also </b><a href="qtglobal.html#quint64-typedef">quint64</a> and <a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a>().</p>
<!-- @@@Q_UINT64_C -->
<!-- $$$Q_UNLIKELY[overload1]$$$Q_UNLIKELY -->
<h3 class="fn" id="Q_UNLIKELY"><a name="Q_UNLIKELY"></a><span class="name">Q_UNLIKELY</span>(<i>expr</i>)</h3>
<p>Hints to the compiler that the enclosed condition, <i>expr</i>, is likely to evaluate to <code>false</code>.</p>
<p>Use of this macro can help the compiler to optimize the code.</p>
<p>Example:</p>
<pre class="cpp">

  bool readConfiguration(<span class="keyword">const</span> <span class="type"><a href="qfile.html">QFile</a></span> <span class="operator">&amp;</span>file)
  {
      <span class="comment">// We expect to be asked to read an existing file</span>
      <span class="keyword">if</span> (Q_UNLIKELY(<span class="operator">!</span>file<span class="operator">.</span>exists())) {
          <a href="qtglobal.html#qWarning">qWarning</a>() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;File not found&quot;</span>;
          <span class="keyword">return</span> <span class="keyword">false</span>;
      }

      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="keyword">return</span> <span class="keyword">true</span>;
  }

</pre>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qtglobal.html#Q_LIKELY">Q_LIKELY</a>().</p>
<!-- @@@Q_UNLIKELY -->
<!-- $$$Q_UNREACHABLE[overload1]$$$Q_UNREACHABLE -->
<h3 class="fn" id="Q_UNREACHABLE"><a name="Q_UNREACHABLE"></a><span class="type">void</span> <span class="name">Q_UNREACHABLE</span>()</h3>
<p>Tells the compiler that the current point cannot be reached by any execution, so it may optimize any code paths leading here as dead code, as well as code continuing from here.</p>
<p>This macro is useful to mark impossible conditions. For example, given the following enum:</p>
<pre class="cpp">

     <span class="keyword">enum</span> Shapes {
         Rectangle<span class="operator">,</span>
         Triangle<span class="operator">,</span>
         Circle<span class="operator">,</span>
         NumShapes
     };

</pre>
<p>One can write a switch table like so:</p>
<pre class="cpp">

     <span class="keyword">switch</span> (shape) {
         <span class="keyword">case</span> Rectangle:
             <span class="keyword">return</span> rectangle();
         <span class="keyword">case</span> Triangle:
             <span class="keyword">return</span> triangle();
         <span class="keyword">case</span> Circle:
             <span class="keyword">return</span> circle();
         <span class="keyword">case</span> NumShapes:
             Q_UNREACHABLE();
             <span class="keyword">break</span>;
     }

</pre>
<p>The advantage of inserting Q_UNREACHABLE() at that point is that the compiler is told not to generate code for a shape variable containing that value. If the macro is missing, the compiler will still generate the necessary comparisons for that value. If the case label were removed, some compilers could produce a warning that some enum values were not checked.</p>
<p>By using this macro in impossible conditions, code coverage may be improved as dead code paths may be eliminated.</p>
<p>In debug builds the condition is enforced by an assert to facilitate debugging.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>See also </b><a href="qtglobal.html#Q_ASSERT">Q_ASSERT</a>(), <a href="qtglobal.html#Q_ASSUME">Q_ASSUME</a>(), and <a href="qtglobal.html#qFatal">qFatal</a>().</p>
<!-- @@@Q_UNREACHABLE -->
<!-- $$$Q_UNUSED[overload1]$$$Q_UNUSED -->
<h3 class="fn" id="Q_UNUSED"><a name="Q_UNUSED"></a><span class="name">Q_UNUSED</span>(<i>name</i>)</h3>
<p>Indicates to the compiler that the parameter with the specified <i>name</i> is not used in the body of a function. This can be used to suppress compiler warnings while allowing functions to be defined with meaningful parameter names in their signatures.</p>
<!-- @@@Q_UNUSED -->
<!-- $$$foreach[overload1]$$$foreach -->
<h3 class="fn" id="foreach"><a name="foreach"></a><span class="name">foreach</span>(<i>variable</i>, <i>container</i>)</h3>
<p>This macro is used to implement Qt's <code>foreach</code> loop. The <i>variable</i> parameter is a variable name or variable definition; the <i>container</i> parameter is a Qt container whose value type corresponds to the type of the variable. See <a href="containers.html#the-foreach-keyword">The foreach Keyword</a> for details.</p>
<p>If you're worried about namespace pollution, you can disable this macro by adding the following line to your <code>.pro</code> file:</p>
<pre class="cpp">

  CONFIG <span class="operator">+</span><span class="operator">=</span> no_keywords

</pre>
<p><b>Note: </b>Since Qt 5.7, the use of this macro is discouraged. It will be removed in a future version of Qt. Please use C++11 range-for, possibly with <a href="qtglobal.html#qAsConst">qAsConst</a>(), as needed.</p><p><b>See also </b><a href="qtglobal.html#qAsConst">qAsConst</a>().</p>
<!-- @@@foreach -->
<!-- $$$forever[overload1]$$$forever -->
<h3 class="fn" id="forever"><a name="forever"></a><span class="name">forever</span></h3>
<p>This macro is provided for convenience for writing infinite loops.</p>
<p>Example:</p>
<pre class="cpp">

  forever {
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  }

</pre>
<p>It is equivalent to <code>for (;;)</code>.</p>
<p>If you're worried about namespace pollution, you can disable this macro by adding the following line to your <code>.pro</code> file:</p>
<pre class="cpp">

  CONFIG <span class="operator">+</span><span class="operator">=</span> no_keywords

</pre>
<p><b>See also </b><a href="qtglobal.html#Q_FOREVER">Q_FOREVER</a>.</p>
<!-- @@@forever -->
<!-- $$$qCritical[overload1]$$$qCriticalconstchar*... -->
<h3 class="fn" id="qCritical"><a name="qCritical"></a><span class="name">qCritical</span>(const <span class="type">char</span> *<i>message</i>, <i>...</i>)</h3>
<p>Calls the message handler with the critical message <i>message</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. On QNX the message is sent to slogger2</p>
<p>It exits if the environment variable QT_FATAL_CRITICALS is not empty.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">void</span> load(<span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&amp;</span>fileName)
  {
      <span class="type"><a href="qfile.html">QFile</a></span> file(fileName);
      <span class="keyword">if</span> (<span class="operator">!</span>file<span class="operator">.</span>exists())
          qCritical(<span class="string">&quot;File '%s' does not exist!&quot;</span><span class="operator">,</span> qUtf8Printable(fileName));
  }

</pre>
<p>If you include &lt;QtDebug&gt;, a more convenient syntax is also available:</p>
<pre class="cpp">

  qCritical() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Brush:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> myQBrush <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Other
  value:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> i;

</pre>
<p>A space is inserted between the items, and a newline is appended at the end.</p>
<p>To suppress the output at runtime, install your own message handler with <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), and Debugging Techniques.</p>
<!-- @@@qCritical -->
<!-- $$$qDebug[overload1]$$$qDebugconstchar*... -->
<h3 class="fn" id="qDebug"><a name="qDebug"></a><span class="name">qDebug</span>(const <span class="type">char</span> *<i>message</i>, <i>...</i>)</h3>
<p>Calls the message handler with the debug message <i>message</i>. If no message handler has been installed, the message is printed to stderr. Under Windows the message is sent to the console, if it is a console application; otherwise, it is sent to the debugger. On QNX, the message is sent to slogger2. This function does nothing if <code>QT_NO_DEBUG_OUTPUT</code> was defined during compilation.</p>
<p>If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre class="cpp">

  qDebug(<span class="string">&quot;Items in list: %d&quot;</span><span class="operator">,</span> myList<span class="operator">.</span>size());

</pre>
<p>If you include <code>&lt;QtDebug&gt;</code>, a more convenient syntax is also available:</p>
<pre class="cpp">

  qDebug() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Brush:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> myQBrush <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Other value:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> i;

</pre>
<p>With this syntax, the function returns a <a href="qdebug.html">QDebug</a> object that is configured to use the <a href="qtglobal.html#QtMsgType-enum">QtDebugMsg</a> message type. It automatically puts a single space between each item, and outputs a newline at the end. It supports many C++ and Qt types.</p>
<p>To suppress the output at run-time, install your own message handler with <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p><b>See also </b><a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), and Debugging Techniques.</p>
<!-- @@@qDebug -->
<!-- $$$qFatal[overload1]$$$qFatalconstchar*... -->
<h3 class="fn" id="qFatal"><a name="qFatal"></a><span class="name">qFatal</span>(const <span class="type">char</span> *<i>message</i>, <i>...</i>)</h3>
<p>Calls the message handler with the fatal message <i>message</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. On QNX the message is sent to slogger2</p>
<p>If you are using the <b>default message handler</b> this function will abort to create a core dump. On Windows, for debug builds, this function will report a _CRT_ERROR enabling you to connect a debugger to the application.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">int</span> divide(<span class="type">int</span> a<span class="operator">,</span> <span class="type">int</span> b)
  {
      <span class="keyword">if</span> (b <span class="operator">=</span><span class="operator">=</span> <span class="number">0</span>)                                <span class="comment">// program error</span>
          qFatal(<span class="string">&quot;divide: cannot divide by zero&quot;</span>);
      <span class="keyword">return</span> a <span class="operator">/</span> b;
  }

</pre>
<p>To suppress the output at runtime, install your own message handler with <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), and Debugging Techniques.</p>
<!-- @@@qFatal -->
<!-- $$$qInfo[overload1]$$$qInfoconstchar*... -->
<h3 class="fn" id="qInfo"><a name="qInfo"></a><span class="name">qInfo</span>(const <span class="type">char</span> *<i>message</i>, <i>...</i>)</h3>
<p>Calls the message handler with the informational message <i>message</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the console, if it is a console application; otherwise, it is sent to the debugger. On QNX the message is sent to slogger2. This function does nothing if <code>QT_NO_INFO_OUTPUT</code> was defined during compilation.</p>
<p>If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre class="cpp">

  qInfo(<span class="string">&quot;Items in list: %d&quot;</span><span class="operator">,</span> myList<span class="operator">.</span>size());

</pre>
<p>If you include <code>&lt;QtDebug&gt;</code>, a more convenient syntax is also available:</p>
<pre class="cpp">

  qInfo() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Brush:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> myQBrush <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Other value:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> i;

</pre>
<p>With this syntax, the function returns a <a href="qdebug.html">QDebug</a> object that is configured to use the <a href="qtglobal.html#QtMsgType-enum">QtInfoMsg</a> message type. It automatically puts a single space between each item, and outputs a newline at the end. It supports many C++ and Qt types.</p>
<p>To suppress the output at run-time, install your own message handler with <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), and Debugging Techniques.</p>
<!-- @@@qInfo -->
<!-- $$$qMove[overload1]$$$qMove -->
<h3 class="fn" id="qMove"><a name="qMove"></a><span class="name">qMove</span>(<i>x</i>)</h3>
<p>It expands to &quot;std::move&quot; if your compiler supports that C++11 function, or to nothing otherwise.</p>
<p>qMove takes an rvalue reference to its parameter <i>x</i>, and converts it to an xvalue.</p>
<!-- @@@qMove -->
<!-- $$$qPrintable[overload1]$$$qPrintableconstQString& -->
<h3 class="fn" id="qPrintable"><a name="qPrintable"></a>const <span class="type">char</span> *<span class="name">qPrintable</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>)</h3>
<p>Returns <i>str</i> as a <code>const char *</code>. This is equivalent to <i>str</i>.toLocal8Bit().constData().</p>
<p>The char pointer will be invalid after the statement in which qPrintable() is used. This is because the array returned by <a href="qstring.html#toLocal8Bit">QString::toLocal8Bit</a>() will fall out of scope.</p>
<p><b>Note: </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>() expect %s arguments to be UTF-8 encoded, while qPrintable() converts to local 8-bit encoding. Therefore <a href="qtglobal.html#qUtf8Printable">qUtf8Printable</a>() should be used for logging strings instead of qPrintable().</p><p><b>See also </b><a href="qtglobal.html#qUtf8Printable">qUtf8Printable</a>().</p>
<!-- @@@qPrintable -->
<!-- $$$qUtf16Printable[overload1]$$$qUtf16PrintableconstQString& -->
<h3 class="fn" id="qUtf16Printable"><a name="qUtf16Printable"></a>const <span class="type">wchar_t</span> *<span class="name">qUtf16Printable</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>)</h3>
<p>Returns <i>str</i> as a <code>const ushort *</code>, but cast to a <code>const wchar_t *</code> to avoid warnings. This is equivalent to <i>str</i>.utf16() plus some casting.</p>
<p>The only useful thing you can do with the return value of this macro is to pass it to <a href="qstring.html#asprintf">QString::asprintf</a>() for use in a <code>%ls</code> conversion. In particular, the return value is <i>not</i> a valid <code>const wchar_t*</code>!</p>
<p>In general, the pointer will be invalid after the statement in which qUtf16Printable() is used. This is because the pointer may have been obtained from a temporary expression, which will fall out of scope.</p>
<p>Example:</p>
<pre class="cpp">

  <a href="qtglobal.html#qWarning">qWarning</a>(<span class="string">&quot;%ls: %ls&quot;</span><span class="operator">,</span> qUtf16Printable(key)<span class="operator">,</span> qUtf16Printable(value));

</pre>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qtglobal.html#qPrintable">qPrintable</a>(), <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), and <a href="qtglobal.html#qFatal">qFatal</a>().</p>
<!-- @@@qUtf16Printable -->
<!-- $$$qUtf8Printable[overload1]$$$qUtf8PrintableconstQString& -->
<h3 class="fn" id="qUtf8Printable"><a name="qUtf8Printable"></a>const <span class="type">char</span> *<span class="name">qUtf8Printable</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>)</h3>
<p>Returns <i>str</i> as a <code>const char *</code>. This is equivalent to <i>str</i>.toUtf8().constData().</p>
<p>The char pointer will be invalid after the statement in which qUtf8Printable() is used. This is because the array returned by <a href="qstring.html#toUtf8">QString::toUtf8</a>() will fall out of scope.</p>
<p>Example:</p>
<pre class="cpp">

  <a href="qtglobal.html#qWarning">qWarning</a>(<span class="string">&quot;%s: %s&quot;</span><span class="operator">,</span> qUtf8Printable(key)<span class="operator">,</span> qUtf8Printable(value));

</pre>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qtglobal.html#qPrintable">qPrintable</a>(), <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), and <a href="qtglobal.html#qFatal">qFatal</a>().</p>
<!-- @@@qUtf8Printable -->
<!-- $$$qWarning[overload1]$$$qWarningconstchar*... -->
<h3 class="fn" id="qWarning"><a name="qWarning"></a><span class="name">qWarning</span>(const <span class="type">char</span> *<i>message</i>, <i>...</i>)</h3>
<p>Calls the message handler with the warning message <i>message</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. On QNX the message is sent to slogger2. This function does nothing if <code>QT_NO_WARNING_OUTPUT</code> was defined during compilation; it exits if the environment variable <code>QT_FATAL_WARNINGS</code> is not empty.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">void</span> f(<span class="type">int</span> c)
  {
      <span class="keyword">if</span> (c <span class="operator">&gt;</span> <span class="number">200</span>)
          qWarning(<span class="string">&quot;f: bad argument, c == %d&quot;</span><span class="operator">,</span> c);
  }

</pre>
<p>If you include &lt;QtDebug&gt;, a more convenient syntax is also available:</p>
<pre class="cpp">

  qWarning() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Brush:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> myQBrush <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Other value:&quot;</span>
  <span class="operator">&lt;</span><span class="operator">&lt;</span> i;

</pre>
<p>This syntax inserts a space between each item, and appends a newline at the end.</p>
<p>To suppress the output at runtime, install your own message handler with <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p>
<p><b>Note:</b> This function is thread-safe.</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qInfo">qInfo</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>(), and Debugging Techniques.</p>
<!-- @@@qWarning -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 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>