Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6853

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qglobal.cpp -->
  <title>Qt 4.8: &lt;QtGlobal&gt; - Global Qt Declarations</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<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>
<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>
<li><a href="qtglobal-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="Typesx"></a>
<h2>Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QtMsgHandler-typedef">QtMsgHandler</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, 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#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>
<a name="Functionsx"></a>
<h2>Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qAbs">qAbs</a></b> ( const T &amp; <i>value</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"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qCritical">qCritical</a></b> ( const char * <i>msg</i>, ... )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qDebug">qDebug</a></b> ( const char * <i>msg</i>, ... )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFatal">qFatal</a></b> ( const char * <i>msg</i>, ... )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qFuzzyCompare-8">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-9">qFuzzyCompare</a></b> ( float <i>p1</i>, float <i>p2</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QtMsgHandler </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a></b> ( QtMsgHandler <i>handler</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qMacVersion">qMacVersion</a></b> ()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const T &amp; </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qMax">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#qMin">qMin</a></b> ( const T &amp; <i>value1</i>, const T &amp; <i>value2</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qRound64">qRound64</a></b> ( qreal <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> ( qreal <i>value</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> const char * </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qVersion">qVersion</a></b> ()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qWarning">qWarning</a></b> ( const char * <i>msg</i>, ... )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> T * </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#q_check_ptrx">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"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qt_set_sequence_auto_mnemonic">qt_set_sequence_auto_mnemonic</a></b> ( bool <i>on</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qt_symbian_exception2Error">qt_symbian_exception2Error</a></b> ( const std::exception &amp; <i>aThrow</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qt_symbian_exception2LeaveL">qt_symbian_exception2LeaveL</a></b> ( const std::exception &amp; <i>aThrow</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qt_symbian_throwIfError">qt_symbian_throwIfError</a></b> ( int <i>error</i> )</td></tr>
</table>
<a name="Macrosx"></a>
<h2>Macros</h2>
<table class="alignedsummary">
<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_TRAP_THROWING">QT_TRAP_THROWING</a></b> (  <i>function</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_TRYCATCH_ERROR">QT_TRYCATCH_ERROR</a></b> (  <i>error</i>,  <i>function</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#QT_TRYCATCH_LEAVING">QT_TRYCATCH_LEAVING</a></b> (  <i>function</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"> </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_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_MWERKS">Q_CC_MWERKS</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_PTR">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_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_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_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"> 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_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_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_MSDOS">Q_OS_MSDOS</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_OS2">Q_OS_OS2</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_OS2EMX">Q_OS_OS2EMX</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_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_SYMBIAN">Q_OS_SYMBIAN</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_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_WINCE">Q_OS_WINCE</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"> </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#Q_WS_S60">Q_WS_S60</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_WS_QPA">Q_WS_QPA</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a></b></td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a></b></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"> const char * </td><td class="memItemRight bottomAlign"><b><a href="qtglobal.html#qPrintable">qPrintable</a></b> ( const QString &amp; <i>str</i> )</td></tr>
</table>
<!-- $$$<QtGlobal>-description -->
<div class="descr"> <a name="details"></a>
<p>The global declarations include <a href="#types">types</a>, <a href="#functions">functions</a> and <a href="#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>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 <tt>long long int</tt> (<tt>__int64</tt> on Windows).</p>
<p>Several convenience type definitions are declared: <a href="qtglobal.html#qreal-typedef">qreal</a> for <tt>double</tt>, <a href="qtglobal.html#uchar-typedef">uchar</a> for <tt>unsigned</tt> char, <a href="qtglobal.html#uint-typedef">uint</a> for <tt>unsigned</tt> int, <a href="qtglobal.html#ulong-typedef">ulong</a> for <tt>unsigned</tt> long and <a href="qtglobal.html#ushort-typedef">ushort</a> for <tt>unsigned</tt> 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#QtMsgHandler-typedef">QtMsgHandler</a> is a type definition for a pointer to a function with the signature <tt>void myMsgHandler(QtMsgType, const char *)</tt>.</p>
<a name="functions"></a>
<h2>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#qAbs">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#qMin">qMin</a>() and <a href="qtglobal.html#qMax">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#qCritical">qCritical</a>(), <a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qFatal">qFatal</a>() and <a href="qtglobal.html#qWarning">qWarning</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 <a href="qtglobal.html#qreal-typedef">qreal</a> value as their argument returning the value rounded up to the nearest integer and 64-bit integer respectively, the <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>() function which installs the given <a href="qtglobal.html#QtMsgHandler-typedef">QtMsgHandler</a>, and the <a href="qtglobal.html#qVersion">qVersion</a>() function which returns the version number of Qt at run-time as a string.</p>
<a name="macros"></a>
<h2>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_WIN32">Q_OS_WIN32</a> which is defined for Microsoft Windows.</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_PTR">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>() macro 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>
<!-- $$$QtMsgHandler -->
<h3 class="fn"><a name="QtMsgHandler-typedef"></a>typedef <span class="name">QtMsgHandler</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> myMsgHandler(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span><span class="operator">,</span> <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>);</pre>
<p><b>See also </b><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a> and <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<!-- @@@QtMsgHandler -->
<!-- $$$QtMsgType$$$QtDebugMsg$$$QtWarningMsg$$$QtCriticalMsg$$$QtFatalMsg$$$QtSystemMsg -->
<h3 class="fn"><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#QtMsgHandler-typedef">QtMsgHandler</a>). You can use the enum to identify and associate the various message types with the appropriate actions.</p>
<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"><tt>QtDebugMsg</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qDebug">qDebug</a>() function.</td></tr>
<tr><td class="topAlign"><tt>QtWarningMsg</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qWarning">qWarning</a>() function.</td></tr>
<tr><td class="topAlign"><tt>QtCriticalMsg</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qCritical">qCritical</a>() function.</td></tr>
<tr><td class="topAlign"><tt>QtFatalMsg</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">A message generated by the <a href="qtglobal.html#qFatal">qFatal</a>() function.</td></tr>
<tr><td class="topAlign"><tt>QtSystemMsg</tt></td><td class="topAlign"><tt>QtCriticalMsg</tt></td><td class="topAlign">&nbsp;</td></tr>
</table>
<p><b>See also </b><a href="qtglobal.html#QtMsgHandler-typedef">QtMsgHandler</a> and <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<!-- @@@QtMsgType -->
<!-- $$$qint8 -->
<h3 class="fn"><a name="qint8-typedef"></a>typedef <span class="name">qint8</span></h3>
<p>Typedef for <tt>signed char</tt>. This type is guaranteed to be 8-bit on all platforms supported by Qt.</p>
<!-- @@@qint8 -->
<!-- $$$qint16 -->
<h3 class="fn"><a name="qint16-typedef"></a>typedef <span class="name">qint16</span></h3>
<p>Typedef for <tt>signed short</tt>. This type is guaranteed to be 16-bit on all platforms supported by Qt.</p>
<!-- @@@qint16 -->
<!-- $$$qint32 -->
<h3 class="fn"><a name="qint32-typedef"></a>typedef <span class="name">qint32</span></h3>
<p>Typedef for <tt>signed int</tt>. This type is guaranteed to be 32-bit on all platforms supported by Qt.</p>
<!-- @@@qint32 -->
<!-- $$$qint64 -->
<h3 class="fn"><a name="qint64-typedef"></a>typedef <span class="name">qint64</span></h3>
<p>Typedef for <tt>long long int</tt> (<tt>__int64</tt> 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> <a href="qtglobal.html#Q_INT64_C">Q_INT64_C</a>(<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 -->
<!-- $$$qlonglong -->
<h3 class="fn"><a name="qlonglong-typedef"></a>typedef <span class="name">qlonglong</span></h3>
<p>Typedef for <tt>long long int</tt> (<tt>__int64</tt> 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"><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"><a name="qreal-typedef"></a>typedef <span class="name">qreal</span></h3>
<p>Typedef for <tt>double</tt> on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, <tt>qreal</tt> is a typedef for <tt>float</tt> for performance reasons.</p>
<!-- @@@qreal -->
<!-- $$$quint8 -->
<h3 class="fn"><a name="quint8-typedef"></a>typedef <span class="name">quint8</span></h3>
<p>Typedef for <tt>unsigned char</tt>. This type is guaranteed to be 8-bit on all platforms supported by Qt.</p>
<!-- @@@quint8 -->
<!-- $$$quint16 -->
<h3 class="fn"><a name="quint16-typedef"></a>typedef <span class="name">quint16</span></h3>
<p>Typedef for <tt>unsigned short</tt>. This type is guaranteed to be 16-bit on all platforms supported by Qt.</p>
<!-- @@@quint16 -->
<!-- $$$quint32 -->
<h3 class="fn"><a name="quint32-typedef"></a>typedef <span class="name">quint32</span></h3>
<p>Typedef for <tt>unsigned int</tt>. This type is guaranteed to be 32-bit on all platforms supported by Qt.</p>
<!-- @@@quint32 -->
<!-- $$$quint64 -->
<h3 class="fn"><a name="quint64-typedef"></a>typedef <span class="name">quint64</span></h3>
<p>Typedef for <tt>unsigned long long int</tt> (<tt>unsigned __int64</tt> 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> <a href="qtglobal.html#Q_UINT64_C">Q_UINT64_C</a>(<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"><a name="quintptr-typedef"></a>typedef <span class="name">quintptr</span></h3>
<p>Integral type for representing a pointers (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"><a name="qulonglong-typedef"></a>typedef <span class="name">qulonglong</span></h3>
<p>Typedef for <tt>unsigned long long int</tt> (<tt>unsigned __int64</tt> 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"><a name="uchar-typedef"></a>typedef <span class="name">uchar</span></h3>
<p>Convenience typedef for <tt>unsigned char</tt>.</p>
<!-- @@@uchar -->
<!-- $$$uint -->
<h3 class="fn"><a name="uint-typedef"></a>typedef <span class="name">uint</span></h3>
<p>Convenience typedef for <tt>unsigned int</tt>.</p>
<!-- @@@uint -->
<!-- $$$ulong -->
<h3 class="fn"><a name="ulong-typedef"></a>typedef <span class="name">ulong</span></h3>
<p>Convenience typedef for <tt>unsigned long</tt>.</p>
<!-- @@@ulong -->
<!-- $$$ushort -->
<h3 class="fn"><a name="ushort-typedef"></a>typedef <span class="name">ushort</span></h3>
<p>Convenience typedef for <tt>unsigned short</tt>.</p>
<!-- @@@ushort -->
<h2>Function Documentation</h2>
<!-- $$$qAbs[overload1]$$$qAbsconstT& -->
<h3 class="fn"><a name="qAbs"></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 -->
<!-- $$$qBound[overload1]$$$qBoundconstT&constT&constT& -->
<h3 class="fn"><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 qMax(<i>min</i>, qMin(<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#qMin">qMin</a>() and <a href="qtglobal.html#qMax">qMax</a>().</p>
<!-- @@@qBound -->
<!-- $$$qCritical[overload1]$$$qCriticalconstchar*... -->
<h3 class="fn"><a name="qCritical"></a><span class="type">void</span> <span class="name">qCritical</span> ( const <span class="type">char</span> * <i>msg</i>, ... )</h3>
<p>Calls the message handler with the critical message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.</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> <a href="qtglobal.html#qPrintable">qPrintable</a>(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#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@qCritical -->
<!-- $$$qDebug[overload1]$$$qDebugconstchar*... -->
<h3 class="fn"><a name="qDebug"></a><span class="type">void</span> <span class="name">qDebug</span> ( const <span class="type">char</span> * <i>msg</i>, ... )</h3>
<p>Calls the message handler with the debug message <i>msg</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. This function does nothing if <tt>QT_NO_DEBUG_OUTPUT</tt> 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 <tt>&lt;QtDebug&gt;</tt>, 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#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p><b>See also </b><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#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@qDebug -->
<!-- $$$qFatal[overload1]$$$qFatalconstchar*... -->
<h3 class="fn"><a name="qFatal"></a><span class="type">void</span> <span class="name">qFatal</span> ( const <span class="type">char</span> * <i>msg</i>, ... )</h3>
<p>Calls the message handler with the fatal message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.</p>
<p>If you are using the <b>default message handler</b> this function will abort on Unix systems 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#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qWarning">qWarning</a>(), <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@qFatal -->
<!-- $$$qFuzzyCompare$$$qFuzzyComparedoubledouble -->
<h3 class="fn"><a name="qFuzzyCompare-8"></a><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> )<tt> [static]</tt></h3>
<p>Compares the floating point value <i>p1</i> and <i>p2</i> and returns <tt>true</tt> if they are considered equal, otherwise <tt>false</tt>.</p>
<p>Note that comparing values where either <i>p1</i> or <i>p2</i> is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0&#x2e;</p>
<pre class="cpp">         <span class="comment">// Instead of comparing with 0.0</span>
                 <a href="qmatrix4x4.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="qmatrix4x4.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 <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@qFuzzyCompare -->
<!-- $$$qFuzzyCompare$$$qFuzzyComparefloatfloat -->
<h3 class="fn"><a name="qFuzzyCompare-9"></a><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> )<tt> [static]</tt></h3>
<p>Compares the floating point value <i>p1</i> and <i>p2</i> and returns <tt>true</tt> if they are considered equal, otherwise <tt>false</tt>.</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 <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@qFuzzyCompare -->
<!-- $$$qInstallMsgHandler[overload1]$$$qInstallMsgHandlerQtMsgHandler -->
<h3 class="fn"><a name="qInstallMsgHandler"></a><span class="type"><a href="qtglobal.html#QtMsgHandler-typedef">QtMsgHandler</a></span> <span class="name">qInstallMsgHandler</span> ( <span class="type"><a href="qtglobal.html#QtMsgHandler-typedef">QtMsgHandler</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 (which may be 0).</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 <tt>qInstallMsgHandler(0)</tt>.</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">char</span> <span class="operator">*</span>msg)
 {
     <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\n&quot;</span><span class="operator">,</span> msg);
         <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\n&quot;</span><span class="operator">,</span> msg);
         <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\n&quot;</span><span class="operator">,</span> msg);
         <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\n&quot;</span><span class="operator">,</span> msg);
         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)
 {
     qInstallMsgHandler(myMessageOutput);
     <span class="type"><a href="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><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#QtMsgType-enum">QtMsgType</a>, and <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@qInstallMsgHandler -->
<!-- $$$qMacVersion[overload1]$$$qMacVersion -->
<h3 class="fn"><a name="qMacVersion"></a><span class="type">int</span> <span class="name">qMacVersion</span> ()</h3>
<p>Use <a href="qsysinfo.html#MacintoshVersion-var">QSysInfo::MacintoshVersion</a> instead.</p>
<p><b>See also </b><a href="qsysinfo.html">QSysInfo</a>.</p>
<!-- @@@qMacVersion -->
<!-- $$$qMax[overload1]$$$qMaxconstT&constT& -->
<h3 class="fn"><a name="qMax"></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#qMin">qMin</a>() and <a href="qtglobal.html#qBound">qBound</a>().</p>
<!-- @@@qMax -->
<!-- $$$qMin[overload1]$$$qMinconstT&constT& -->
<h3 class="fn"><a name="qMin"></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#qMax">qMax</a>() and <a href="qtglobal.html#qBound">qBound</a>().</p>
<!-- @@@qMin -->
<!-- $$$qRound64[overload1]$$$qRound64qreal -->
<h3 class="fn"><a name="qRound64"></a><span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> <span class="name">qRound64</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></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"><a href="qtglobal.html#qreal-typedef">qreal</a></span> valueA <span class="operator">=</span> <span class="number">42949672960.3</span>;
 <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> valueB <span class="operator">=</span> <span class="number">42949672960.7</span>;

 <span class="type">int</span> roundedValueA <span class="operator">=</span> <a href="qtglobal.html#qRound">qRound</a>(valueA);
 <span class="comment">// roundedValueA = 42949672960</span>
 <span class="type">int</span> roundedValueB <span class="operator">=</span> <a href="qtglobal.html#qRound">qRound</a>(valueB);
 <span class="comment">// roundedValueB = 42949672961</span></pre>
<!-- @@@qRound64 -->
<!-- $$$qRound[overload1]$$$qRoundqreal -->
<h3 class="fn"><a name="qRound"></a><span class="type">int</span> <span class="name">qRound</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>value</i> )</h3>
<p>Rounds <i>value</i> to the nearest integer.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> valueA <span class="operator">=</span> <span class="number">2.3</span>;
 <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> valueB <span class="operator">=</span> <span class="number">2.7</span>;

 <span class="type">int</span> roundedValueA <span class="operator">=</span> qRound(valueA);
 <span class="comment">// roundedValueA = 2</span>
 <span class="type">int</span> roundedValueB <span class="operator">=</span> qRound(valueB);
 <span class="comment">// roundedValueB = 3</span></pre>
<!-- @@@qRound -->
<!-- $$$qVersion[overload1]$$$qVersion -->
<h3 class="fn"><a name="qVersion"></a>const <span class="type">char</span> * <span class="name">qVersion</span> ()</h3>
<p>Returns the version number of Qt at run-time as a string (for example, &quot;4.1&#x2e;2&quot;). This may be a different version than the version the application was compiled against.</p>
<p><b>See also </b><a href="qtglobal.html#QT_VERSION_STR">QT_VERSION_STR</a>.</p>
<!-- @@@qVersion -->
<!-- $$$qWarning[overload1]$$$qWarningconstchar*... -->
<h3 class="fn"><a name="qWarning"></a><span class="type">void</span> <span class="name">qWarning</span> ( const <span class="type">char</span> * <i>msg</i>, ... )</h3>
<p>Calls the message handler with the warning message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if <tt>QT_NO_WARNING_OUTPUT</tt> was defined during compilation; it exits if the environment variable <tt>QT_FATAL_WARNINGS</tt> is defined.</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#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p><b>See also </b><a href="qtglobal.html#qDebug">qDebug</a>(), <a href="qtglobal.html#qCritical">qCritical</a>(), <a href="qtglobal.html#qFatal">qFatal</a>(), <a href="qtglobal.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@qWarning -->
<!-- $$$q_check_ptr[overload1]$$$q_check_ptrT* -->
<h3 class="fn"><a name="q_check_ptrx"></a><span class="type">T</span> * <span class="name">q_check_ptr</span> ( <span class="type">T</span> * <i>pointer</i> )</h3>
<p>Users Q_CHECK_PTR on <i>pointer</i>, then returns <i>pointer</i>.</p>
<p>This can be used as an inline version of Q_CHECK_PTR.</p>
<!-- @@@q_check_ptr -->
<!-- $$$qgetenv[overload1]$$$qgetenvconstchar* -->
<h3 class="fn"><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>().</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>See also </b><a href="qtglobal.html#qputenv">qputenv</a>().</p>
<!-- @@@qgetenv -->
<!-- $$$qputenv[overload1]$$$qputenvconstchar*constQByteArray& -->
<h3 class="fn"><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><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"><a name="qrand"></a><span class="type">int</span> <span class="name">qrand</span> ()</h3>
<p>Thread-safe version of the standard C++ <tt>rand()</tt> function.</p>
<p>Returns a value between 0 and <tt>RAND_MAX</tt> (defined in <tt>&lt;cstdlib&gt;</tt> and <tt>&lt;stdlib.h&gt;</tt>), the next number in the current sequence of pseudo-random integers.</p>
<p>Use <tt>qsrand()</tt> 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"><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++ <tt>srand()</tt> 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 calls <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"><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 <tt>%n</tt> 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><tt>//% &lt;C string&gt;</tt></p>
<p>or</p>
<p><tt><tt>/*</tt>% &lt;C string&gt; <tt>*/</tt></tt></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 <tt>-idbased</tt> option to the <tt>lrelease</tt> 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 <a href="threads-reentrancy.html#reentrant">reentrant</a>.</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 <a href="internationalization.html">Internationalization with Qt</a>.</p>
<!-- @@@qtTrId -->
<!-- $$$qt_set_sequence_auto_mnemonic[overload1]$$$qt_set_sequence_auto_mnemonicbool -->
<h3 class="fn"><a name="qt_set_sequence_auto_mnemonic"></a><span class="type">void</span> <span class="name">qt_set_sequence_auto_mnemonic</span> ( <span class="type">bool</span> <i>on</i> )</h3>
<p>Enables automatic mnemonics on Mac if <i>on</i> is true; otherwise this feature is disabled.</p>
<p>Note that this function is only available on Mac where mnemonics are disabled by default.</p>
<p>To access to this function, use an extern declaration: extern void qt_set_sequence_auto_mnemonic(bool b);</p>
<p><b>See also </b><a href="qshortcut.html#mnemonic">QShortcut</a>.</p>
<!-- @@@qt_set_sequence_auto_mnemonic -->
<!-- $$$qt_symbian_exception2Error[overload1]$$$qt_symbian_exception2Errorconststd::exception& -->
<h3 class="fn"><a name="qt_symbian_exception2Error"></a><span class="type">int</span> <span class="name">qt_symbian_exception2Error</span> ( const <span class="type">std::exception</span> &amp; <i>aThrow</i> )</h3>
<p>Convert a caught standard C++ exception <i>aThrow</i> to a Symbian error code</p>
<p><b>Warning:</b> This function is only available on Symbian.</p>
<p><b>See also </b><a href="qtglobal.html#qt_symbian_throwIfError">qt_symbian_throwIfError</a>() and <a href="qtglobal.html#qt_symbian_exception2LeaveL">qt_symbian_exception2LeaveL</a>().</p>
<!-- @@@qt_symbian_exception2Error -->
<!-- $$$qt_symbian_exception2LeaveL[overload1]$$$qt_symbian_exception2LeaveLconststd::exception& -->
<h3 class="fn"><a name="qt_symbian_exception2LeaveL"></a><span class="type">void</span> <span class="name">qt_symbian_exception2LeaveL</span> ( const <span class="type">std::exception</span> &amp; <i>aThrow</i> )</h3>
<p>Convert a caught standard C++ exception <i>aThrow</i> to a Symbian leave</p>
<p><b>Warning:</b> This function is only available on Symbian.</p>
<p><b>See also </b><a href="qtglobal.html#qt_symbian_throwIfError">qt_symbian_throwIfError</a>() and <a href="qtglobal.html#qt_symbian_exception2Error">qt_symbian_exception2Error</a>().</p>
<!-- @@@qt_symbian_exception2LeaveL -->
<!-- $$$qt_symbian_throwIfError[overload1]$$$qt_symbian_throwIfErrorint -->
<h3 class="fn"><a name="qt_symbian_throwIfError"></a><span class="type">void</span> <span class="name">qt_symbian_throwIfError</span> ( <span class="type">int</span> <i>error</i> )</h3>
<p>Throws an exception if the <i>error</i> parameter is a symbian error code. This is the exception throwing equivalent of Symbian's User::LeaveIfError.</p>
<p><b>Warning:</b> This function is only available on Symbian.</p>
<p><b>See also </b><a href="qtglobal.html#qt_symbian_exception2LeaveL">qt_symbian_exception2LeaveL</a>() and <a href="qtglobal.html#qt_symbian_exception2Error">qt_symbian_exception2Error</a>().</p>
<!-- @@@qt_symbian_throwIfError -->
<h2>Macro Documentation</h2>
<!-- $$$QT_POINTER_SIZE[overload1]$$$QT_POINTER_SIZE -->
<h3 class="fn"><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 <tt>sizeof(void *)</tt> but can be used in a preprocessor directive.</p>
<!-- @@@QT_POINTER_SIZE -->
<!-- $$$QT_REQUIRE_VERSION[overload1]$$$QT_REQUIRE_VERSIONintchar**constchar* -->
<h3 class="fn"><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 <tt>main()</tt> function's <tt>argc</tt> and <tt>argv</tt> 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="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"><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 <a href="internationalization.html">Internationalization with Qt</a>.</p>
<!-- @@@QT_TRANSLATE_NOOP3 -->
<!-- $$$QT_TRANSLATE_NOOP[overload1]$$$QT_TRANSLATE_NOOP -->
<h3 class="fn"><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 <a href="internationalization.html">Internationalization with Qt</a>.</p>
<!-- @@@QT_TRANSLATE_NOOP -->
<!-- $$$QT_TRAP_THROWING[overload1]$$$QT_TRAP_THROWING -->
<h3 class="fn"><a name="QT_TRAP_THROWING"></a><span class="name">QT_TRAP_THROWING</span> (  <i>function</i> )</h3>
<p>TRAP leaves from Symbian <i>function</i> and throws an appropriate standard C++ exception instead. This must be used when calling Symbian OS leaving functions from inside Qt or standard C++ code, so that the code can respond correctly to the exception.</p>
<p><b>Warning:</b> This macro is only available on Symbian.</p>
<p>Example:</p>
<pre class="cpp"> <span class="comment">// A Symbian leaving function is being called within a Qt function.</span>
 <span class="comment">// Any leave must be converted to an exception</span>
 CAknTitlePane<span class="operator">*</span> titlePane <span class="operator">=</span> S60<span class="operator">-</span><span class="operator">&gt;</span>titlePane();
 <span class="keyword">if</span> (titlePane) {
     TPtrC captionPtr(qt_QString2TPtrC(caption));
     QT_TRAP_THROWING(titlePane<span class="operator">-</span><span class="operator">&gt;</span>SetTextL(captionPtr));
 }</pre>
<p><b>See also </b><a href="qtglobal.html#QT_TRYCATCH_ERROR">QT_TRYCATCH_ERROR</a>() and <a href="qtglobal.html#QT_TRYCATCH_LEAVING">QT_TRYCATCH_LEAVING</a>().</p>
<!-- @@@QT_TRAP_THROWING -->
<!-- $$$QT_TRID_NOOP[overload1]$$$QT_TRID_NOOP -->
<h3 class="fn"><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="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 <a href="internationalization.html">Internationalization with Qt</a>.</p>
<!-- @@@QT_TRID_NOOP -->
<!-- $$$QT_TRYCATCH_ERROR[overload1]$$$QT_TRYCATCH_ERROR -->
<h3 class="fn"><a name="QT_TRYCATCH_ERROR"></a><span class="name">QT_TRYCATCH_ERROR</span> (  <i>error</i>,  <i>function</i> )</h3>
<p>Catch standard C++ exceptions from a <i>function</i> and convert them to a Symbian OS <i>error</i> code, or <tt>KErrNone</tt> if there is no exception. This must be used inside Qt or standard C++ code when using exception throwing code (practically anything) and returning an error code to Symbian OS.</p>
<p><b>Warning:</b> This macro is only available on Symbian.</p>
<p>Example:</p>
<pre class="cpp"> <span class="comment">// An exception might be thrown in this Symbian TInt error returning function.</span>
 <span class="comment">// It is caught and translated to an error code</span>
 TInt <span class="type">QServerApp</span><span class="operator">::</span>Connect(<span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&amp;</span>serverName)
 {
     TPtrC name;
     TInt err;
     QT_TRYCATCH_ERROR(err<span class="operator">,</span> name<span class="operator">.</span>Set(qt_QString2TPtrC(serverName)));
     <span class="keyword">if</span> (err <span class="operator">!</span><span class="operator">=</span> KErrNone)
         <span class="keyword">return</span> err;
     <span class="keyword">return</span> iServer<span class="operator">.</span>Connect(name);
 }</pre>
<p>}</p>
<p><b>See also </b><a href="qtglobal.html#QT_TRYCATCH_LEAVING">QT_TRYCATCH_LEAVING</a>() and <a href="qtglobal.html#QT_TRAP_THROWING">QT_TRAP_THROWING</a>().</p>
<!-- @@@QT_TRYCATCH_ERROR -->
<!-- $$$QT_TRYCATCH_LEAVING[overload1]$$$QT_TRYCATCH_LEAVING -->
<h3 class="fn"><a name="QT_TRYCATCH_LEAVING"></a><span class="name">QT_TRYCATCH_LEAVING</span> (  <i>function</i> )</h3>
<p>Catch standard C++ exceptions from <i>function</i> and convert them to Symbian OS leaves. This must be used inside Qt or standard C++ code when using exception throwing code (practically anything) and returning to Symbian OS from a leaving function. For example inside a Symbian active object's <tt>RunL</tt> function implemented with Qt code.</p>
<p><b>Warning:</b> This macro is only available on Symbian.</p>
<p>Example:</p>
<pre class="cpp"> <span class="comment">// This active object signals Qt code</span>
 <span class="comment">// Exceptions from the Qt code must be converted to Symbian OS leaves for the active scheduler</span>
 <span class="type">void</span> <span class="type">QWakeUpActiveObject</span><span class="operator">::</span>RunL()
 {
     iStatus <span class="operator">=</span> KRequestPending;
     SetActive();
     QT_TRYCATCH_LEAVING(m_dispatcher<span class="operator">-</span><span class="operator">&gt;</span>wakeUpWasCalled());
 }</pre>
<p><b>See also </b><a href="qtglobal.html#QT_TRAP_THROWING">QT_TRAP_THROWING</a>() and <a href="qtglobal.html#QT_TRYCATCH_ERROR">QT_TRYCATCH_ERROR</a>().</p>
<!-- @@@QT_TRYCATCH_LEAVING -->
<!-- $$$QT_TR_NOOP[overload1]$$$QT_TR_NOOP -->
<h3 class="fn"><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. Note that using these macros is not required if <tt>CODECFORTR</tt> is already set to UTF-8 in the qmake project file.</p>
<p><b>See also </b><a href="qtglobal.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() and <a href="internationalization.html">Internationalization with Qt</a>.</p>
<!-- @@@QT_TR_NOOP -->
<!-- $$$QT_VERSION[overload1]$$$QT_VERSION -->
<h3 class="fn"><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="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="qstyle.html">QStyle</a></span><span class="operator">::</span>SP_TrashIcon);
 <span class="preprocessor">#else</span>
     <span class="type"><a href="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="qstyle.html">QStyle</a></span><span class="operator">::</span>SP_TrashIcon);
     <span class="type"><a href="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 <a href="qtglobal.html#qVersion">qVersion</a>().</p>
<!-- @@@QT_VERSION -->
<!-- $$$QT_VERSION_CHECK[overload1]$$$QT_VERSION_CHECK -->
<h3 class="fn"><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><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"><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><a href="qtglobal.html#qVersion">qVersion</a>() and <a href="qtglobal.html#QT_VERSION">QT_VERSION</a>.</p>
<!-- @@@QT_VERSION_STR -->
<!-- $$$Q_ASSERT[overload1]$$$Q_ASSERTbool -->
<h3 class="fn"><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 false.</p>
<p>Q_ASSERT() is useful for testing pre- and post-conditions during development. It does nothing if <tt>QT_NO_DEBUG</tt> 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 <tt>b</tt> 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 <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@Q_ASSERT -->
<!-- $$$Q_ASSERT_X[overload1]$$$Q_ASSERT_Xboolconstchar*constchar* -->
<h3 class="fn"><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 false.</p>
<p>Q_ASSERT_X is useful for testing pre- and post-conditions during development. It does nothing if <tt>QT_NO_DEBUG</tt> 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 <tt>b</tt> 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 <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@Q_ASSERT_X -->
<!-- $$$Q_BIG_ENDIAN[overload1]$$$Q_BIG_ENDIAN -->
<h3 class="fn"><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"><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"><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"><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_COMEAU[overload1]$$$Q_CC_COMEAU -->
<h3 class="fn"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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_MWERKS[overload1]$$$Q_CC_MWERKS -->
<h3 class="fn"><a name="Q_CC_MWERKS"></a><span class="name">Q_CC_MWERKS</span></h3>
<p>Defined if the application is compiled using Metrowerks CodeWarrior.</p>
<!-- @@@Q_CC_MWERKS -->
<!-- $$$Q_CC_OC[overload1]$$$Q_CC_OC -->
<h3 class="fn"><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"><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"><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"><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"><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"><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"><a name="Q_CHECK_PTR"></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 warning message containing the source code's file name and line number, saying that the program ran out of memory.</p>
<p>Q_CHECK_PTR does nothing if <tt>QT_NO_DEBUG</tt> was defined during compilation.</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 <a href="debug.html">Debugging Techniques</a>.</p>
<!-- @@@Q_CHECK_PTR -->
<!-- $$$Q_DECLARE_TYPEINFO[overload1]$$$Q_DECLARE_TYPEINFO -->
<h3 class="fn"><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><tt>Q_PRIMITIVE_TYPE</tt> specifies that <i>Type</i> is a POD (plain old data) type with no constructor or destructor.</li>
<li><tt>Q_MOVABLE_TYPE</tt> specifies that <i>Type</i> has a constructor and/or a destructor but can be moved in memory using <tt>memcpy()</tt>.</li>
<li><tt>Q_COMPLEX_TYPE</tt> (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>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_EXPORT[overload1]$$$Q_DECL_EXPORT -->
<h3 class="fn"><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 <a href="sharedlibrary.html">Creating Shared Libraries</a>).</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_IMPORT">Q_DECL_IMPORT</a>.</p>
<!-- @@@Q_DECL_EXPORT -->
<!-- $$$Q_DECL_IMPORT[overload1]$$$Q_DECL_IMPORT -->
<h3 class="fn"><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 <a href="sharedlibrary.html">Creating Shared Libraries</a>).</p>
<p><b>See also </b><a href="qtglobal.html#Q_DECL_EXPORT">Q_DECL_EXPORT</a>.</p>
<!-- @@@Q_DECL_IMPORT -->
<!-- $$$Q_FOREACH[overload1]$$$Q_FOREACH -->
<h3 class="fn"><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 <tt>no_keywords</tt> is specified using the <tt>.pro</tt> file's <tt>CONFIG</tt> variable.</p>
<p><b>See also </b><a href="qtglobal.html#foreach">foreach</a>().</p>
<!-- @@@Q_FOREACH -->
<!-- $$$Q_FOREVER[overload1]$$$Q_FOREVER -->
<h3 class="fn"><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 <tt>no_keywords</tt> is specified using the <tt>.pro</tt> file's <tt>CONFIG</tt> variable.</p>
<p><b>See also </b><a href="qtglobal.html#foreach">foreach</a>().</p>
<!-- @@@Q_FOREVER -->
<!-- $$$Q_FUNC_INFO[overload1]$$$Q_FUNC_INFO -->
<h3 class="fn"><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><tt>const TInputType&amp; myMin(const TInputType&amp;, const TInputType&amp;) [with TInputType = int] was called with value1: 3 value2: 4</tt></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"><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"><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 <tt>true</tt>.</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"><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"><a name="Q_OS_AIX"></a><span class="name">Q_OS_AIX</span></h3>
<p>Defined on AIX.</p>
<!-- @@@Q_OS_AIX -->
<!-- $$$Q_OS_BSD4[overload1]$$$Q_OS_BSD4 -->
<h3 class="fn"><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"><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"><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"><a name="Q_OS_DARWIN"></a><span class="name">Q_OS_DARWIN</span></h3>
<p>Defined on Darwin OS (synonym for <a href="qtglobal.html#Q_OS_MAC">Q_OS_MAC</a>).</p>
<!-- @@@Q_OS_DARWIN -->
<!-- $$$Q_OS_DGUX[overload1]$$$Q_OS_DGUX -->
<h3 class="fn"><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"><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"><a name="Q_OS_FREEBSD"></a><span class="name">Q_OS_FREEBSD</span></h3>
<p>Defined on FreeBSD.</p>
<!-- @@@Q_OS_FREEBSD -->
<!-- $$$Q_OS_HPUX[overload1]$$$Q_OS_HPUX -->
<h3 class="fn"><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"><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_IRIX[overload1]$$$Q_OS_IRIX -->
<h3 class="fn"><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"><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"><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"><a name="Q_OS_MAC"></a><span class="name">Q_OS_MAC</span></h3>
<p>Defined on MAC OS (synonym for Darwin).</p>
<!-- @@@Q_OS_MAC -->
<!-- $$$Q_OS_MSDOS[overload1]$$$Q_OS_MSDOS -->
<h3 class="fn"><a name="Q_OS_MSDOS"></a><span class="name">Q_OS_MSDOS</span></h3>
<p>Defined on MS-DOS and Windows.</p>
<!-- @@@Q_OS_MSDOS -->
<!-- $$$Q_OS_NETBSD[overload1]$$$Q_OS_NETBSD -->
<h3 class="fn"><a name="Q_OS_NETBSD"></a><span class="name">Q_OS_NETBSD</span></h3>
<p>Defined on NetBSD.</p>
<!-- @@@Q_OS_NETBSD -->
<!-- $$$Q_OS_OS2[overload1]$$$Q_OS_OS2 -->
<h3 class="fn"><a name="Q_OS_OS2"></a><span class="name">Q_OS_OS2</span></h3>
<p>Defined on OS/2.</p>
<!-- @@@Q_OS_OS2 -->
<!-- $$$Q_OS_OPENBSD[overload1]$$$Q_OS_OPENBSD -->
<h3 class="fn"><a name="Q_OS_OPENBSD"></a><span class="name">Q_OS_OPENBSD</span></h3>
<p>Defined on OpenBSD.</p>
<!-- @@@Q_OS_OPENBSD -->
<!-- $$$Q_OS_OS2EMX[overload1]$$$Q_OS_OS2EMX -->
<h3 class="fn"><a name="Q_OS_OS2EMX"></a><span class="name">Q_OS_OS2EMX</span></h3>
<p>Defined on XFree86 on OS/2 (not PM).</p>
<!-- @@@Q_OS_OS2EMX -->
<!-- $$$Q_OS_OSF[overload1]$$$Q_OS_OSF -->
<h3 class="fn"><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_QNX[overload1]$$$Q_OS_QNX -->
<h3 class="fn"><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"><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"><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"><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_SYMBIAN[overload1]$$$Q_OS_SYMBIAN -->
<h3 class="fn"><a name="Q_OS_SYMBIAN"></a><span class="name">Q_OS_SYMBIAN</span></h3>
<p>Defined on Symbian.</p>
<!-- @@@Q_OS_SYMBIAN -->
<!-- $$$Q_OS_ULTRIX[overload1]$$$Q_OS_ULTRIX -->
<h3 class="fn"><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"><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"><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_WIN32[overload1]$$$Q_OS_WIN32 -->
<h3 class="fn"><a name="Q_OS_WIN32"></a><span class="name">Q_OS_WIN32</span></h3>
<p>Defined on all supported versions of Windows.</p>
<!-- @@@Q_OS_WIN32 -->
<!-- $$$Q_OS_WINCE[overload1]$$$Q_OS_WINCE -->
<h3 class="fn"><a name="Q_OS_WINCE"></a><span class="name">Q_OS_WINCE</span></h3>
<p>Defined on Windows CE.</p>
<!-- @@@Q_OS_WINCE -->
<!-- $$$Q_UINT64_C[overload1]$$$Q_UINT64_C -->
<h3 class="fn"><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"><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 <tt>false</tt>.</p>
<p>Use of this macro can help the compiler to optimize the code.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type">bool</span> 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_UNUSED[overload1]$$$Q_UNUSED -->
<h3 class="fn"><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 -->
<!-- $$$Q_WS_S60[overload1]$$$Q_WS_S60 -->
<h3 class="fn"><a name="Q_WS_S60"></a><span class="name">Q_WS_S60</span></h3>
<p>Defined on S60 with the Avkon UI framework.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a>, <a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a>, <a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a>, and <a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a>.</p>
<!-- @@@Q_WS_S60 -->
<!-- $$$Q_WS_X11[overload1]$$$Q_WS_X11 -->
<h3 class="fn"><a name="Q_WS_X11"></a><span class="name">Q_WS_X11</span></h3>
<p>Defined on X11.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a>, <a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a>, <a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a>, <a href="qtglobal.html#Q_WS_QPA">Q_WS_QPA</a>, and <a href="qtglobal.html#Q_WS_S60">Q_WS_S60</a>.</p>
<!-- @@@Q_WS_X11 -->
<!-- $$$Q_WS_MAC[overload1]$$$Q_WS_MAC -->
<h3 class="fn"><a name="Q_WS_MAC"></a><span class="name">Q_WS_MAC</span></h3>
<p>Defined on Mac OS X.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a>, <a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a>, <a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a>, <a href="qtglobal.html#Q_WS_QPA">Q_WS_QPA</a>, and <a href="qtglobal.html#Q_WS_S60">Q_WS_S60</a>.</p>
<!-- @@@Q_WS_MAC -->
<!-- $$$Q_WS_QPA[overload1]$$$Q_WS_QPA -->
<h3 class="fn"><a name="Q_WS_QPA"></a><span class="name">Q_WS_QPA</span></h3>
<p>Defined on Qt for Embedded Linux, Lite version.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a>, <a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a>, <a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a>, <a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a>, and <a href="qtglobal.html#Q_WS_S60">Q_WS_S60</a>.</p>
<!-- @@@Q_WS_QPA -->
<!-- $$$Q_WS_QWS[overload1]$$$Q_WS_QWS -->
<h3 class="fn"><a name="Q_WS_QWS"></a><span class="name">Q_WS_QWS</span></h3>
<p>Defined on Qt for Embedded Linux.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a>, <a href="qtglobal.html#Q_WS_WIN">Q_WS_WIN</a>, <a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a>, <a href="qtglobal.html#Q_WS_QPA">Q_WS_QPA</a>, and <a href="qtglobal.html#Q_WS_S60">Q_WS_S60</a>.</p>
<!-- @@@Q_WS_QWS -->
<!-- $$$Q_WS_WIN[overload1]$$$Q_WS_WIN -->
<h3 class="fn"><a name="Q_WS_WIN"></a><span class="name">Q_WS_WIN</span></h3>
<p>Defined on Windows.</p>
<p><b>See also </b><a href="qtglobal.html#Q_WS_MAC">Q_WS_MAC</a>, <a href="qtglobal.html#Q_WS_X11">Q_WS_X11</a>, <a href="qtglobal.html#Q_WS_QWS">Q_WS_QWS</a>, <a href="qtglobal.html#Q_WS_QPA">Q_WS_QPA</a>, and <a href="qtglobal.html#Q_WS_S60">Q_WS_S60</a>.</p>
<!-- @@@Q_WS_WIN -->
<!-- $$$foreach[overload1]$$$foreach -->
<h3 class="fn"><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 <tt>foreach</tt> 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 <tt>.pro</tt> 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_FOREACH">Q_FOREACH</a>().</p>
<!-- @@@foreach -->
<!-- $$$forever[overload1]$$$forever -->
<h3 class="fn"><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 <tt>for (;;)</tt>.</p>
<p>If you're worried about namespace pollution, you can disable this macro by adding the following line to your <tt>.pro</tt> 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 -->
<!-- $$$qPrintable[overload1]$$$qPrintableconstQString& -->
<h3 class="fn"><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 <tt>const char *</tt>. 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 toLocal8Bit() 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> qPrintable(key)<span class="operator">,</span> qPrintable(value));</pre>
<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>(), and <a href="qtglobal.html#qFatal">qFatal</a>().</p>
<!-- @@@qPrintable -->
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>