Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6971

qt4-doc-4.8.7-26.2.mga7.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" />
<!-- qvariant.cpp -->
  <title>Qt 4.8: QVariant Class Reference</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 -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QVariant</li>
            </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="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#a-note-on-gui-types">A Note on GUI Types</a></li>
<li class="level2"><a href="#using-canconvert-and-convert-consecutively">Using canConvert() and convert() Consecutively</a></li>
</ul>
</div>
<h1 class="title">QVariant Class Reference</h1>
<!-- $$$QVariant-brief -->
<p>The QVariant class acts like a union for the most common Qt data types. <a href="#details">More...</a></p>
<!-- @@@QVariant -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QVariant&gt;</span></pre><p><b>Inherited by: </b><a href="qdbusvariant.html">QDBusVariant</a>.</p>
<ul>
<li><a href="qvariant-members.html">List of all members, including inherited members</a></li>
<li><a href="qvariant-obsolete.html">Obsolete members</a></li>
<li><a href="qvariant-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#Type-enum">Type</a></b> { Invalid, BitArray, Bitmap, Bool, ..., UserType }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant">QVariant</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-36">QVariant</a></b> ( const QLocale &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-37">QVariant</a></b> ( const QRegExp &amp; <i>regExp</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-38">QVariant</a></b> ( const QEasingCurve &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-39">QVariant</a></b> ( Qt::GlobalColor <i>color</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-2">QVariant</a></b> ( Type <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-3">QVariant</a></b> ( int <i>typeOrUserType</i>, const void * <i>copy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-5">QVariant</a></b> ( const QVariant &amp; <i>p</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-6">QVariant</a></b> ( QDataStream &amp; <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-7">QVariant</a></b> ( int <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-8">QVariant</a></b> ( uint <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-9">QVariant</a></b> ( qlonglong <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-10">QVariant</a></b> ( qulonglong <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-11">QVariant</a></b> ( bool <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-12">QVariant</a></b> ( double <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-13">QVariant</a></b> ( float <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-14">QVariant</a></b> ( const char * <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-15">QVariant</a></b> ( const QByteArray &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-16">QVariant</a></b> ( const QBitArray &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-17">QVariant</a></b> ( const QString &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-18">QVariant</a></b> ( const QLatin1String &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-19">QVariant</a></b> ( const QStringList &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-20">QVariant</a></b> ( const QChar &amp; <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-21">QVariant</a></b> ( const QDate &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-22">QVariant</a></b> ( const QTime &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-23">QVariant</a></b> ( const QDateTime &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-24">QVariant</a></b> ( const QList&lt;QVariant&gt; &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-25">QVariant</a></b> ( const QMap&lt;QString, QVariant&gt; &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-26">QVariant</a></b> ( const QHash&lt;QString, QVariant&gt; &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-27">QVariant</a></b> ( const QSize &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-28">QVariant</a></b> ( const QSizeF &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-29">QVariant</a></b> ( const QPoint &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-30">QVariant</a></b> ( const QPointF &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-31">QVariant</a></b> ( const QLine &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-32">QVariant</a></b> ( const QLineF &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-33">QVariant</a></b> ( const QRect &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-34">QVariant</a></b> ( const QRectF &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariant-35">QVariant</a></b> ( const QUrl &amp; <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#dtor.QVariant">~QVariant</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#canConvert">canConvert</a></b> ( Type <i>t</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#canConvert-2">canConvert</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#convert">convert</a></b> ( Type <i>t</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#setValue">setValue</a></b> ( const T &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#swap">swap</a></b> ( QVariant &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBitArray </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toBitArray">toBitArray</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toBool">toBool</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toByteArray">toByteArray</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QChar </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toChar">toChar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toDate">toDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDateTime </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toDateTime">toDateTime</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toDouble">toDouble</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QEasingCurve </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toEasingCurve">toEasingCurve</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toFloat">toFloat</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHash&lt;QString, QVariant&gt; </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toHash">toHash</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toInt">toInt</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLine </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toLine">toLine</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toLineF">toLineF</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QVariant&gt; </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toList">toList</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLocale </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toLocale">toLocale</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qlonglong </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toLongLong">toLongLong</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMap&lt;QString, QVariant&gt; </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toMap">toMap</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toPoint">toPoint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toPointF">toPointF</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toReal">toReal</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toRect">toRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toRectF">toRectF</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegExp </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toRegExp">toRegExp</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toSize">toSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toSizeF">toSizeF</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toString">toString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toStringList">toStringList</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTime </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toTime">toTime</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toUInt">toUInt</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qulonglong </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toULongLong">toULongLong</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#toUrl">toUrl</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const char * </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#typeName">typeName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#userType">userType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#value">value</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#operator-not-eq">operator!=</a></b> ( const QVariant &amp; <i>v</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant &amp; </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#operator-eq">operator=</a></b> ( const QVariant &amp; <i>variant</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#operator-eq-eq">operator==</a></b> ( const QVariant &amp; <i>v</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#fromValue">fromValue</a></b> ( const T &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#nameToType">nameToType</a></b> ( const char * <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const char * </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#typeToName">typeToName</a></b> ( Type <i>typ</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariantHash-typedef">QVariantHash</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariantList-typedef">QVariantList</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#QVariantMap-typedef">QVariantMap</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#qvariant_cast">qvariant_cast</a></b> ( const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#operator-not-eq-3">operator!=</a></b> ( const QVariant &amp; <i>v1</i>, const QVariant &amp; <i>v2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qvariant.html#operator-eq-eq-3">operator==</a></b> ( const QVariant &amp; <i>v1</i>, const QVariant &amp; <i>v2</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QVariant-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QVariant class acts like a union for the most common Qt data types.</p>
<p>Because C++ forbids unions from including types that have non-default constructors or destructors, most interesting Qt classes cannot be used in unions. Without QVariant, this would be a problem for <a href="qobject.html#property">QObject::property</a>() and for database work, etc.</p>
<p>A QVariant object holds a single value of a single <a href="qvariant.html#type">type</a>() at a time. (Some <a href="qvariant.html#type">type</a>()s are multi-valued, for example a string list.) You can find out what type, T, the variant holds, convert it to a different type using <a href="qvariant.html#convert">convert</a>(), get its value using one of the toT() functions (e.g&#x2e;, <a href="qvariant.html#toSize">toSize</a>()) and check whether the type can be converted to a particular type using <a href="qvariant.html#canConvert">canConvert</a>().</p>
<p>The methods named toT() (e.g&#x2e;, <a href="qvariant.html#toInt">toInt</a>(), <a href="qvariant.html#toString">toString</a>()) are const. If you ask for the stored type, they return a copy of the stored object. If you ask for a type that can be generated from the stored type, toT() copies and converts and leaves the object itself unchanged. If you ask for a type that cannot be generated from the stored type, the result depends on the type; see the function documentation for details.</p>
<p>Here is some example code to demonstrate the use of QVariant:</p>
<pre class="cpp"> <span class="type"><a href="qdatastream.html">QDataStream</a></span> out(<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>);
 <span class="type">QVariant</span> v(<span class="number">123</span>);                <span class="comment">// The variant now contains an int</span>
 <span class="type">int</span> x <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toInt">toInt</a>();              <span class="comment">// x = 123</span>
 out <span class="operator">&lt;</span><span class="operator">&lt;</span> v;                       <span class="comment">// Writes a type tag and an int to out</span>
 v <span class="operator">=</span> <span class="type">QVariant</span>(<span class="string">&quot;hello&quot;</span>);          <span class="comment">// The variant now contains a QByteArray</span>
 v <span class="operator">=</span> <span class="type">QVariant</span>(tr(<span class="string">&quot;hello&quot;</span>));      <span class="comment">// The variant now contains a QString</span>
 <span class="type">int</span> y <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toInt">toInt</a>();              <span class="comment">// y = 0 since v cannot be converted to an int</span>
 <span class="type"><a href="qstring.html">QString</a></span> s <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toString">toString</a>();       <span class="comment">// s = tr(&quot;hello&quot;)  (see QObject::tr())</span>
 out <span class="operator">&lt;</span><span class="operator">&lt;</span> v;                       <span class="comment">// Writes a type tag and a QString to out</span>
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="type"><a href="qdatastream.html">QDataStream</a></span> in(<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>);            <span class="comment">// (opening the previously written stream)</span>
 in <span class="operator">&gt;</span><span class="operator">&gt;</span> v;                        <span class="comment">// Reads an Int variant</span>
 <span class="type">int</span> z <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toInt">toInt</a>();              <span class="comment">// z = 123</span>
 <a href="qtglobal.html#qDebug">qDebug</a>(<span class="string">&quot;Type is %s&quot;</span><span class="operator">,</span>            <span class="comment">// prints &quot;Type is int&quot;</span>
         v<span class="operator">.</span>typeName());
 v <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toInt">toInt</a>() <span class="operator">+</span> <span class="number">100</span>;            <span class="comment">// The variant now hold the value 223</span>
 v <span class="operator">=</span> <span class="type">QVariant</span>(<span class="type"><a href="qstringlist.html">QStringList</a></span>());</pre>
<p>You can even store <a href="qlist.html">QList</a>&lt;QVariant&gt; and <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, QVariant&gt; values in a variant, so you can easily construct arbitrarily complex data structures of arbitrary types. This is very powerful and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures.</p>
<p>QVariant also supports the notion of null values, where you can have a defined type with no value set. However, note that QVariant types can only be cast when they have had a value set.</p>
<pre class="cpp"> <span class="type">QVariant</span> x<span class="operator">,</span> y(<span class="type"><a href="qstring.html">QString</a></span>())<span class="operator">,</span> z(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">&quot;&quot;</span>));
 x<span class="operator">.</span><a href="qvariant.html#convert">convert</a>(<span class="type">QVariant</span><span class="operator">::</span>Int);
 <span class="comment">// x.isNull() == true</span>
 <span class="comment">// y.isNull() == true, z.isNull() == false</span></pre>
<p>QVariant can be extended to support other types than those mentioned in the <a href="qvariant.html#Type-enum">Type</a> enum. See the <a href="qmetatype.html">QMetaType</a> documentation for details.</p>
<a name="a-note-on-gui-types"></a>
<h3>A Note on GUI Types</h3>
<p>Because QVariant is part of the <a href="qtcore.html">QtCore</a> library, it cannot provide conversion functions to data types defined in <a href="qtgui.html">QtGui</a>, such as <a href="qcolor.html">QColor</a>, <a href="qimage.html">QImage</a>, and <a href="qpixmap.html">QPixmap</a>. In other words, there is no <tt>toColor()</tt> function. Instead, you can use the <a href="qvariant.html#value">QVariant::value</a>() or the <a href="qvariant.html#qvariant_cast">qvariant_cast</a>() template function. For example:</p>
<pre class="cpp"> <span class="type">QVariant</span> variant;
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="type"><a href="qcolor.html">QColor</a></span> color <span class="operator">=</span> variant<span class="operator">.</span>value<span class="operator">&lt;</span><span class="type"><a href="qcolor.html">QColor</a></span><span class="operator">&gt;</span>();</pre>
<p>The inverse conversion (e.g&#x2e;, from <a href="qcolor.html">QColor</a> to QVariant) is automatic for all data types supported by QVariant, including GUI-related types:</p>
<pre class="cpp"> <span class="type"><a href="qcolor.html">QColor</a></span> color <span class="operator">=</span> palette()<span class="operator">.</span>background()<span class="operator">.</span>color();
 <span class="type">QVariant</span> variant <span class="operator">=</span> color;</pre>
<a name="using-canconvert-and-convert-consecutively"></a>
<h3>Using canConvert() and convert() Consecutively</h3>
<p>When using <a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>() consecutively, it is possible for <a href="qvariant.html#canConvert">canConvert</a>() to return true, but <a href="qvariant.html#convert">convert</a>() to return false. This is typically because <a href="qvariant.html#canConvert">canConvert</a>() only reports the general ability of QVariant to convert between types given suitable data; it is still possible to supply data which cannot actually be converted.</p>
<p>For example, <a href="qvariant.html#canConvert">canConvert</a>() would return true when called on a variant containing a string because, in principle, QVariant is able to convert strings of numbers to integers. However, if the string contains non-numeric characters, it cannot be converted to an integer, and any attempt to convert it will fail. Hence, it is important to have both functions return true for a successful conversion.</p>
</div>
<p><b>See also </b><a href="qmetatype.html">QMetaType</a>.</p>
<!-- @@@QVariant -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Type$$$Invalid$$$Bool$$$Int$$$UInt$$$LongLong$$$ULongLong$$$Double$$$Char$$$Map$$$List$$$String$$$StringList$$$ByteArray$$$BitArray$$$Date$$$Time$$$DateTime$$$Url$$$Locale$$$Rect$$$RectF$$$Size$$$SizeF$$$Line$$$LineF$$$Point$$$PointF$$$RegExp$$$Hash$$$EasingCurve$$$LastCoreType$$$ColorGroup$$$Font$$$Pixmap$$$Brush$$$Color$$$Palette$$$Icon$$$Image$$$Polygon$$$Region$$$Bitmap$$$Cursor$$$SizePolicy$$$KeySequence$$$Pen$$$TextLength$$$TextFormat$$$Matrix$$$Transform$$$Matrix4x4$$$Vector2D$$$Vector3D$$$Vector4D$$$Quaternion$$$LastGuiType$$$UserType$$$IconSet$$$CString$$$PointArray$$$LastType -->
<h3 class="fn"><a name="Type-enum"></a>enum QVariant::<span class="name">Type</span></h3>
<p>This enum type defines the types of variable that a <a href="qvariant.html">QVariant</a> can contain.</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>QVariant::Invalid</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">no type</td></tr>
<tr><td class="topAlign"><tt>QVariant::BitArray</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign">a <a href="qbitarray.html">QBitArray</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Bitmap</tt></td><td class="topAlign"><tt>73</tt></td><td class="topAlign">a <a href="qbitmap.html">QBitmap</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Bool</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">a bool</td></tr>
<tr><td class="topAlign"><tt>QVariant::Brush</tt></td><td class="topAlign"><tt>66</tt></td><td class="topAlign">a <a href="qbrush.html">QBrush</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::ByteArray</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign">a <a href="qbytearray.html">QByteArray</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Char</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">a <a href="qchar.html">QChar</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Color</tt></td><td class="topAlign"><tt>67</tt></td><td class="topAlign">a <a href="qcolor.html">QColor</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Cursor</tt></td><td class="topAlign"><tt>74</tt></td><td class="topAlign">a <a href="qcursor.html">QCursor</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Date</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign">a <a href="qdate.html">QDate</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::DateTime</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign">a <a href="qdatetime.html">QDateTime</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Double</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">a double</td></tr>
<tr><td class="topAlign"><tt>QVariant::EasingCurve</tt></td><td class="topAlign"><tt>29</tt></td><td class="topAlign">a <a href="qeasingcurve.html">QEasingCurve</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Font</tt></td><td class="topAlign"><tt>64</tt></td><td class="topAlign">a <a href="qfont.html">QFont</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Hash</tt></td><td class="topAlign"><tt>28</tt></td><td class="topAlign">a <a href="qvariant.html#QVariantHash-typedef">QVariantHash</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Icon</tt></td><td class="topAlign"><tt>69</tt></td><td class="topAlign">a <a href="qicon.html">QIcon</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Image</tt></td><td class="topAlign"><tt>70</tt></td><td class="topAlign">a <a href="qimage.html">QImage</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Int</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">an int</td></tr>
<tr><td class="topAlign"><tt>QVariant::KeySequence</tt></td><td class="topAlign"><tt>76</tt></td><td class="topAlign">a <a href="qkeysequence.html">QKeySequence</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Line</tt></td><td class="topAlign"><tt>23</tt></td><td class="topAlign">a <a href="qline.html">QLine</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::LineF</tt></td><td class="topAlign"><tt>24</tt></td><td class="topAlign">a <a href="qlinef.html">QLineF</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::List</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">a <a href="qvariant.html#QVariantList-typedef">QVariantList</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Locale</tt></td><td class="topAlign"><tt>18</tt></td><td class="topAlign">a <a href="qlocale.html">QLocale</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::LongLong</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">a <a href="qtglobal.html#qlonglong-typedef">qlonglong</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Map</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">a <a href="qvariant.html#QVariantMap-typedef">QVariantMap</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Matrix</tt></td><td class="topAlign"><tt>80</tt></td><td class="topAlign">a <a href="qmatrix.html" class="obsolete">QMatrix<sup>(obsolete)</sup></a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Transform</tt></td><td class="topAlign"><tt>81</tt></td><td class="topAlign">a <a href="qtransform.html">QTransform</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Matrix4x4</tt></td><td class="topAlign"><tt>82</tt></td><td class="topAlign">a <a href="qmatrix4x4.html">QMatrix4x4</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Palette</tt></td><td class="topAlign"><tt>68</tt></td><td class="topAlign">a <a href="qpalette.html">QPalette</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Pen</tt></td><td class="topAlign"><tt>77</tt></td><td class="topAlign">a <a href="qpen.html">QPen</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Pixmap</tt></td><td class="topAlign"><tt>65</tt></td><td class="topAlign">a <a href="qpixmap.html">QPixmap</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Point</tt></td><td class="topAlign"><tt>25</tt></td><td class="topAlign">a <a href="qpoint.html">QPoint</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::PointArray</tt></td><td class="topAlign"><tt>Polygon</tt></td><td class="topAlign">a <a href="porting4.html#qpointarray">QPointArray</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::PointF</tt></td><td class="topAlign"><tt>26</tt></td><td class="topAlign">a <a href="qpointf.html">QPointF</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Polygon</tt></td><td class="topAlign"><tt>71</tt></td><td class="topAlign">a <a href="qpolygon.html">QPolygon</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Quaternion</tt></td><td class="topAlign"><tt>86</tt></td><td class="topAlign">a <a href="qquaternion.html">QQuaternion</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Rect</tt></td><td class="topAlign"><tt>19</tt></td><td class="topAlign">a <a href="qrect.html">QRect</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::RectF</tt></td><td class="topAlign"><tt>20</tt></td><td class="topAlign">a <a href="qrectf.html">QRectF</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::RegExp</tt></td><td class="topAlign"><tt>27</tt></td><td class="topAlign">a <a href="qregexp.html">QRegExp</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Region</tt></td><td class="topAlign"><tt>72</tt></td><td class="topAlign">a <a href="qregion.html">QRegion</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Size</tt></td><td class="topAlign"><tt>21</tt></td><td class="topAlign">a <a href="qsize.html">QSize</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::SizeF</tt></td><td class="topAlign"><tt>22</tt></td><td class="topAlign">a <a href="qsizef.html">QSizeF</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::SizePolicy</tt></td><td class="topAlign"><tt>75</tt></td><td class="topAlign">a <a href="qsizepolicy.html">QSizePolicy</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::String</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">a <a href="qstring.html">QString</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::StringList</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">a <a href="qstringlist.html">QStringList</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::TextFormat</tt></td><td class="topAlign"><tt>79</tt></td><td class="topAlign">a <a href="qtextformat.html">QTextFormat</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::TextLength</tt></td><td class="topAlign"><tt>78</tt></td><td class="topAlign">a <a href="qtextlength.html">QTextLength</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Time</tt></td><td class="topAlign"><tt>15</tt></td><td class="topAlign">a <a href="qtime.html">QTime</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::UInt</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">a <a href="qtglobal.html#uint-typedef">uint</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::ULongLong</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">a <a href="qtglobal.html#qulonglong-typedef">qulonglong</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Url</tt></td><td class="topAlign"><tt>17</tt></td><td class="topAlign">a <a href="qurl.html">QUrl</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Vector2D</tt></td><td class="topAlign"><tt>83</tt></td><td class="topAlign">a <a href="qvector2d.html">QVector2D</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Vector3D</tt></td><td class="topAlign"><tt>84</tt></td><td class="topAlign">a <a href="qvector3d.html">QVector3D</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::Vector4D</tt></td><td class="topAlign"><tt>85</tt></td><td class="topAlign">a <a href="qvector4d.html">QVector4D</a></td></tr>
<tr><td class="topAlign"><tt>QVariant::UserType</tt></td><td class="topAlign"><tt>127</tt></td><td class="topAlign">Base value for user-defined types.</td></tr>
</table>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QVariant[overload1]$$$QVariant -->
<h3 class="fn"><a name="QVariant"></a>QVariant::<span class="name">QVariant</span> ()</h3>
<p>Constructs an invalid variant.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQLocale& -->
<h3 class="fn"><a name="QVariant-36"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qlocale.html">QLocale</a></span> &amp; <i>l</i> )</h3>
<p>Constructs a new variant with a locale value, <i>l</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQRegExp& -->
<h3 class="fn"><a name="QVariant-37"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qregexp.html">QRegExp</a></span> &amp; <i>regExp</i> )</h3>
<p>Constructs a new variant with the regexp value <i>regExp</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQEasingCurve& -->
<h3 class="fn"><a name="QVariant-38"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qeasingcurve.html">QEasingCurve</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with an easing curve value, <i>val</i>.</p>
<p>This function was introduced in Qt 4.7.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantQt::GlobalColor -->
<h3 class="fn"><a name="QVariant-39"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qt.html#GlobalColor-enum">Qt::GlobalColor</a></span> <i>color</i> )</h3>
<p>Constructs a new variant of type <a href="qvariant.html#Type-enum">QVariant::Color</a> and initializes it with <i>color</i>.</p>
<p>This is a convenience constructor that allows <tt>QVariant(Qt::blue);</tt> to create a valid <a href="qvariant.html">QVariant</a> storing a <a href="qcolor.html">QColor</a>.</p>
<p>Note: This constructor will assert if the application does not link to the Qt GUI library.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantType -->
<h3 class="fn"><a name="QVariant-2"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qvariant.html#Type-enum">Type</a></span> <i>type</i> )</h3>
<p>Constructs a null variant of type <i>type</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantintconstvoid* -->
<h3 class="fn"><a name="QVariant-3"></a>QVariant::<span class="name">QVariant</span> ( <span class="type">int</span> <i>typeOrUserType</i>, const <span class="type">void</span> * <i>copy</i> )</h3>
<p>Constructs variant of type <i>typeOrUserType</i>, and initializes with <i>copy</i> if <i>copy</i> is not 0.</p>
<p>Note that you have to pass the address of the variable you want stored.</p>
<p>Usually, you never have to use this constructor, use <a href="qvariant.html#fromValue">QVariant::fromValue</a>() instead to construct variants from the pointer types represented by <tt>QMetaType::VoidStar</tt>, <tt>QMetaType::QObjectStar</tt> and <tt>QMetaType::QWidgetStar</tt>.</p>
<p><b>See also </b><a href="qvariant.html#fromValue">QVariant::fromValue</a>() and <a href="qvariant.html#Type-enum">Type</a>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQVariant& -->
<h3 class="fn"><a name="QVariant-5"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type">QVariant</span> &amp; <i>p</i> )</h3>
<p>Constructs a copy of the variant, <i>p</i>, passed as the argument to this constructor.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantQDataStream& -->
<h3 class="fn"><a name="QVariant-6"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i> )</h3>
<p>Reads the variant from the data stream, <i>s</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantint -->
<h3 class="fn"><a name="QVariant-7"></a>QVariant::<span class="name">QVariant</span> ( <span class="type">int</span> <i>val</i> )</h3>
<p>Constructs a new variant with an integer value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantuint -->
<h3 class="fn"><a name="QVariant-8"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>val</i> )</h3>
<p>Constructs a new variant with an unsigned integer value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantqlonglong -->
<h3 class="fn"><a name="QVariant-9"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qtglobal.html#qlonglong-typedef">qlonglong</a></span> <i>val</i> )</h3>
<p>Constructs a new variant with a long long integer value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantqulonglong -->
<h3 class="fn"><a name="QVariant-10"></a>QVariant::<span class="name">QVariant</span> ( <span class="type"><a href="qtglobal.html#qulonglong-typedef">qulonglong</a></span> <i>val</i> )</h3>
<p>Constructs a new variant with an unsigned long long integer value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantbool -->
<h3 class="fn"><a name="QVariant-11"></a>QVariant::<span class="name">QVariant</span> ( <span class="type">bool</span> <i>val</i> )</h3>
<p>Constructs a new variant with a boolean value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantdouble -->
<h3 class="fn"><a name="QVariant-12"></a>QVariant::<span class="name">QVariant</span> ( <span class="type">double</span> <i>val</i> )</h3>
<p>Constructs a new variant with a floating point value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantfloat -->
<h3 class="fn"><a name="QVariant-13"></a>QVariant::<span class="name">QVariant</span> ( <span class="type">float</span> <i>val</i> )</h3>
<p>Constructs a new variant with a floating point value, <i>val</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstchar* -->
<h3 class="fn"><a name="QVariant-14"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type">char</span> * <i>val</i> )</h3>
<p>Constructs a new variant with a string value of <i>val</i>. The variant creates a deep copy of <i>val</i>, using the encoding set by <a href="qtextcodec.html#setCodecForCStrings">QTextCodec::setCodecForCStrings</a>().</p>
<p>Note that <i>val</i> is converted to a <a href="qstring.html">QString</a> for storing in the variant and <a href="qvariant.html#type">QVariant::type</a>() will return <a href="qmetatype.html#Type-enum">QMetaType::QString</a> for the variant.</p>
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications.</p>
<p><b>See also </b><a href="qtextcodec.html#setCodecForCStrings">QTextCodec::setCodecForCStrings</a>().</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQByteArray& -->
<h3 class="fn"><a name="QVariant-15"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a bytearray value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQBitArray& -->
<h3 class="fn"><a name="QVariant-16"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qbitarray.html">QBitArray</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a bitarray value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQString& -->
<h3 class="fn"><a name="QVariant-17"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a string value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQLatin1String& -->
<h3 class="fn"><a name="QVariant-18"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a string value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQStringList& -->
<h3 class="fn"><a name="QVariant-19"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a string list value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQChar& -->
<h3 class="fn"><a name="QVariant-20"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qchar.html">QChar</a></span> &amp; <i>c</i> )</h3>
<p>Constructs a new variant with a char value, <i>c</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQDate& -->
<h3 class="fn"><a name="QVariant-21"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a date value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQTime& -->
<h3 class="fn"><a name="QVariant-22"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qtime.html">QTime</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a time value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQDateTime& -->
<h3 class="fn"><a name="QVariant-23"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a date/time value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQList<QVariant>& -->
<h3 class="fn"><a name="QVariant-24"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QVariant</span>&gt; &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a list value, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQMap<QString,QVariant>& -->
<h3 class="fn"><a name="QVariant-25"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qmap.html">QMap</a></span>&lt;<span class="type"><a href="qstring.html">QString</a></span>, <span class="type">QVariant</span>&gt; &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a map of <a href="qtwebkit-bridge.html#qvariants">QVariants</a>, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQHash<QString,QVariant>& -->
<h3 class="fn"><a name="QVariant-26"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qhash.html">QHash</a></span>&lt;<span class="type"><a href="qstring.html">QString</a></span>, <span class="type">QVariant</span>&gt; &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a hash of <a href="qtwebkit-bridge.html#qvariants">QVariants</a>, <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQSize& -->
<h3 class="fn"><a name="QVariant-27"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qsize.html">QSize</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a size value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQSizeF& -->
<h3 class="fn"><a name="QVariant-28"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a size value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQPoint& -->
<h3 class="fn"><a name="QVariant-29"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a point value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQPointF& -->
<h3 class="fn"><a name="QVariant-30"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a point value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQLine& -->
<h3 class="fn"><a name="QVariant-31"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qline.html">QLine</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a line value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQLineF& -->
<h3 class="fn"><a name="QVariant-32"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qlinef.html">QLineF</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a line value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQRect& -->
<h3 class="fn"><a name="QVariant-33"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a rect value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQRectF& -->
<h3 class="fn"><a name="QVariant-34"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a rect value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$QVariant$$$QVariantconstQUrl& -->
<h3 class="fn"><a name="QVariant-35"></a>QVariant::<span class="name">QVariant</span> ( const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>val</i> )</h3>
<p>Constructs a new variant with a url value of <i>val</i>.</p>
<!-- @@@QVariant -->
<!-- $$$~QVariant[overload1]$$$~QVariant -->
<h3 class="fn"><a name="dtor.QVariant"></a>QVariant::<span class="name">~QVariant</span> ()</h3>
<p>Destroys the <a href="qvariant.html">QVariant</a> and the contained object.</p>
<p>Note that subclasses that reimplement <a href="qvariant.html#clear">clear</a>() should reimplement the destructor to call <a href="qvariant.html#clear">clear</a>(). This destructor calls <a href="qvariant.html#clear">clear</a>(), but because it is the destructor, <a href="qvariant.html#clear">QVariant::clear</a>() is called rather than a subclass's <a href="qvariant.html#clear">clear</a>().</p>
<!-- @@@~QVariant -->
<!-- $$$canConvert[overload1]$$$canConvertType -->
<h3 class="fn"><a name="canConvert"></a><span class="type">bool</span> QVariant::<span class="name">canConvert</span> ( <span class="type"><a href="qvariant.html#Type-enum">Type</a></span> <i>t</i> ) const</h3>
<p>Returns true if the variant's type can be cast to the requested type, <i>t</i>. Such casting is done automatically when calling the <a href="qvariant.html#toInt">toInt</a>(), <a href="qvariant.html#toBool">toBool</a>(), ..&#x2e; methods.</p>
<p>The following casts are done automatically:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Type</th><th >Automatically Cast To</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Bool</a></td><td ><a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">ByteArray</a></td><td ><a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Char</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">Color</a></td><td ><a href="qvariant.html#Type-enum">String</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Date</a></td><td ><a href="qvariant.html#Type-enum">DateTime</a>, <a href="qvariant.html#Type-enum">String</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">DateTime</a></td><td ><a href="qvariant.html#Type-enum">Date</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">Time</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Double</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">Font</a></td><td ><a href="qvariant.html#Type-enum">String</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Int</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">KeySequence</a></td><td ><a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">String</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">List</a></td><td ><a href="qvariant.html#Type-enum">StringList</a> (if the list's items can be converted to strings)</td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">LongLong</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Point</a></td><td ><a href="qvariant.html#Type-enum">PointF</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">Rect</a></td><td ><a href="qvariant.html#Type-enum">RectF</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">String</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Color</a>, <a href="qvariant.html#Type-enum">Date</a>, <a href="qvariant.html#Type-enum">DateTime</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Font</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">KeySequence</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">StringList</a>, <a href="qvariant.html#Type-enum">Time</a>, <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">StringList</a></td><td ><a href="qvariant.html#Type-enum">List</a>, <a href="qvariant.html#Type-enum">String</a> (if the list contains exactly one item)</td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">Time</a></td><td ><a href="qvariant.html#Type-enum">String</a></td></tr>
<tr valign="top" class="even"><td ><a href="qvariant.html#Type-enum">UInt</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">ULongLong</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qvariant.html#Type-enum">ULongLong</a></td><td ><a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a></td></tr>
</table>
<p><b>See also </b><a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@canConvert -->
<!-- $$$canConvert$$$canConvert -->
<h3 class="fn"><a name="canConvert-2"></a><span class="type">bool</span> QVariant::<span class="name">canConvert</span> () const</h3>
<p>Returns true if the variant can be converted to the template type <tt>T</tt>, otherwise false.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qvariant.html">QVariant</a></span> v <span class="operator">=</span> <span class="number">42</span>;

 v<span class="operator">.</span>canConvert<span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span>();              <span class="comment">// returns true</span>
 v<span class="operator">.</span>canConvert<span class="operator">&lt;</span><span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>();          <span class="comment">// returns true</span>

 MyCustomStruct s;
 v<span class="operator">.</span><a href="qvariant.html#setValue">setValue</a>(s);

 v<span class="operator">.</span>canConvert<span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span>();              <span class="comment">// returns false</span>
 v<span class="operator">.</span>canConvert<span class="operator">&lt;</span>MyCustomStruct<span class="operator">&gt;</span>();   <span class="comment">// returns true</span></pre>
<p><b>See also </b><a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@canConvert -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QVariant::<span class="name">clear</span> ()</h3>
<p>Convert this variant to type Invalid and free up any resources used.</p>
<!-- @@@clear -->
<!-- $$$convert[overload1]$$$convertType -->
<h3 class="fn"><a name="convert"></a><span class="type">bool</span> QVariant::<span class="name">convert</span> ( <span class="type"><a href="qvariant.html#Type-enum">Type</a></span> <i>t</i> )</h3>
<p>Casts the variant to the requested type, <i>t</i>. If the cast cannot be done, the variant is cleared. Returns true if the current type of the variant was successfully cast; otherwise returns false.</p>
<p><b>Warning:</b> For historical reasons, converting a null <a href="qvariant.html">QVariant</a> results in a null value of the desired type (e.g&#x2e;, an empty string for <a href="qstring.html">QString</a>) and a result of false.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#clear">clear</a>().</p>
<!-- @@@convert -->
<!-- $$$fromValue[overload1]$$$fromValueconstT& -->
<h3 class="fn"><a name="fromValue"></a><span class="type">QVariant</span> QVariant::<span class="name">fromValue</span> ( const <span class="type">T</span> &amp; <i>value</i> )<tt> [static]</tt></h3>
<p>Returns a <a href="qvariant.html">QVariant</a> containing a copy of <i>value</i>. Behaves exactly like <a href="qvariant.html#setValue">setValue</a>() otherwise.</p>
<p>Example:</p>
<pre class="cpp"> MyCustomStruct s;
 <span class="keyword">return</span> <span class="type"><a href="qvariant.html">QVariant</a></span><span class="operator">::</span>fromValue(s);</pre>
<p><b>Note:</b> If you are working with custom types, you should use the <a href="qmetatype.html#Q_DECLARE_METATYPE">Q_DECLARE_METATYPE</a>() macro to register your custom type.</p>
<p><b>See also </b><a href="qvariant.html#setValue">setValue</a>() and <a href="qvariant.html#value">value</a>().</p>
<!-- @@@fromValue -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QVariant::<span class="name">isNull</span> () const</h3>
<p>Returns true if this is a NULL variant, false otherwise.</p>
<!-- @@@isNull -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QVariant::<span class="name">isValid</span> () const</h3>
<p>Returns true if the storage type of this variant is not <a href="qvariant.html#Type-enum">QVariant::Invalid</a>; otherwise returns false.</p>
<!-- @@@isValid -->
<!-- $$$nameToType[overload1]$$$nameToTypeconstchar* -->
<h3 class="fn"><a name="nameToType"></a><span class="type"><a href="qvariant.html#Type-enum">Type</a></span> QVariant::<span class="name">nameToType</span> ( const <span class="type">char</span> * <i>name</i> )<tt> [static]</tt></h3>
<p>Converts the string representation of the storage type given in <i>name</i>, to its enum representation.</p>
<p>If the string representation cannot be converted to any enum representation, the variant is set to <tt>Invalid</tt>.</p>
<!-- @@@nameToType -->
<!-- $$$setValue[overload1]$$$setValueconstT& -->
<h3 class="fn"><a name="setValue"></a><span class="type">void</span> QVariant::<span class="name">setValue</span> ( const <span class="type">T</span> &amp; <i>value</i> )</h3>
<p>Stores a copy of <i>value</i>. If <tt>T</tt> is a type that <a href="qvariant.html">QVariant</a> doesn't support, <a href="qmetatype.html">QMetaType</a> is used to store the value. A compile error will occur if <a href="qmetatype.html">QMetaType</a> doesn't handle the type.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qvariant.html">QVariant</a></span> v;

 v<span class="operator">.</span>setValue(<span class="number">5</span>);
 <span class="type">int</span> i <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toInt">toInt</a>();         <span class="comment">// i is now 5</span>
 <span class="type"><a href="qstring.html">QString</a></span> s <span class="operator">=</span> v<span class="operator">.</span><a href="qvariant.html#toString">toString</a>()   <span class="comment">// s is now &quot;5&quot;</span>

 MyCustomStruct c;
 v<span class="operator">.</span>setValue(c);

 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

 MyCustomStruct c2 <span class="operator">=</span> v<span class="operator">.</span>value<span class="operator">&lt;</span>MyCustomStruct<span class="operator">&gt;</span>();</pre>
<p><b>See also </b><a href="qvariant.html#value">value</a>(), <a href="qvariant.html#fromValue">fromValue</a>(), and <a href="qvariant.html#canConvert">canConvert</a>().</p>
<!-- @@@setValue -->
<!-- $$$swap[overload1]$$$swapQVariant& -->
<h3 class="fn"><a name="swap"></a><span class="type">void</span> QVariant::<span class="name">swap</span> ( <span class="type">QVariant</span> &amp; <i>other</i> )</h3>
<p>Swaps variant <i>other</i> with this variant. This operation is very fast and never fails.</p>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@swap -->
<!-- $$$toBitArray[overload1]$$$toBitArray -->
<h3 class="fn"><a name="toBitArray"></a><span class="type"><a href="qbitarray.html">QBitArray</a></span> QVariant::<span class="name">toBitArray</span> () const</h3>
<p>Returns the variant as a <a href="qbitarray.html">QBitArray</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">BitArray</a>; otherwise returns an empty bit array.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toBitArray -->
<!-- $$$toBool[overload1]$$$toBool -->
<h3 class="fn"><a name="toBool"></a><span class="type">bool</span> QVariant::<span class="name">toBool</span> () const</h3>
<p>Returns the variant as a bool if the variant has <a href="qvariant.html#type">type</a>() Bool.</p>
<p>Returns true if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a> and the value is non-zero, or if the variant has type <a href="qvariant.html#Type-enum">String</a> or <a href="qvariant.html#Type-enum">ByteArray</a> and its lower-case content is not empty, &quot;0&quot; or &quot;false&quot;; otherwise returns false.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toBool -->
<!-- $$$toByteArray[overload1]$$$toByteArray -->
<h3 class="fn"><a name="toByteArray"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QVariant::<span class="name">toByteArray</span> () const</h3>
<p>Returns the variant as a <a href="qbytearray.html">QByteArray</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">ByteArray</a> or <a href="qvariant.html#Type-enum">String</a> (converted using <a href="qstring.html#fromAscii">QString::fromAscii</a>()); otherwise returns an empty byte array.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toByteArray -->
<!-- $$$toChar[overload1]$$$toChar -->
<h3 class="fn"><a name="toChar"></a><span class="type"><a href="qchar.html">QChar</a></span> QVariant::<span class="name">toChar</span> () const</h3>
<p>Returns the variant as a <a href="qchar.html">QChar</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Int</a>, or <a href="qvariant.html#Type-enum">UInt</a>; otherwise returns an invalid <a href="qchar.html">QChar</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toChar -->
<!-- $$$toDate[overload1]$$$toDate -->
<h3 class="fn"><a name="toDate"></a><span class="type"><a href="qdate.html">QDate</a></span> QVariant::<span class="name">toDate</span> () const</h3>
<p>Returns the variant as a <a href="qdate.html">QDate</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Date</a>, <a href="qvariant.html#Type-enum">DateTime</a>, or <a href="qvariant.html#Type-enum">String</a>; otherwise returns an invalid date.</p>
<p>If the <a href="qvariant.html#type">type</a>() is <a href="qvariant.html#Type-enum">String</a>, an invalid date will be returned if the string cannot be parsed as a <a href="qt.html#DateFormat-enum">Qt::ISODate</a> format date.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toDate -->
<!-- $$$toDateTime[overload1]$$$toDateTime -->
<h3 class="fn"><a name="toDateTime"></a><span class="type"><a href="qdatetime.html">QDateTime</a></span> QVariant::<span class="name">toDateTime</span> () const</h3>
<p>Returns the variant as a <a href="qdatetime.html">QDateTime</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">DateTime</a>, <a href="qvariant.html#Type-enum">Date</a>, or <a href="qvariant.html#Type-enum">String</a>; otherwise returns an invalid date/time.</p>
<p>If the <a href="qvariant.html#type">type</a>() is <a href="qvariant.html#Type-enum">String</a>, an invalid date/time will be returned if the string cannot be parsed as a <a href="qt.html#DateFormat-enum">Qt::ISODate</a> format date/time.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toDateTime -->
<!-- $$$toDouble[overload1]$$$toDoublebool* -->
<h3 class="fn"><a name="toDouble"></a><span class="type">double</span> QVariant::<span class="name">toDouble</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as a double if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Double</a>, <a href="qmetatype.html#Type-enum">QMetaType::Float</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.0&#x2e;</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to a double; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toDouble -->
<!-- $$$toEasingCurve[overload1]$$$toEasingCurve -->
<h3 class="fn"><a name="toEasingCurve"></a><span class="type"><a href="qeasingcurve.html">QEasingCurve</a></span> QVariant::<span class="name">toEasingCurve</span> () const</h3>
<p>Returns the variant as a <a href="qeasingcurve.html">QEasingCurve</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">EasingCurve</a>; otherwise returns a default easing curve.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toEasingCurve -->
<!-- $$$toFloat[overload1]$$$toFloatbool* -->
<h3 class="fn"><a name="toFloat"></a><span class="type">float</span> QVariant::<span class="name">toFloat</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as a float if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Double</a>, <a href="qmetatype.html#Type-enum">QMetaType::Float</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.0&#x2e;</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to a double; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toFloat -->
<!-- $$$toHash[overload1]$$$toHash -->
<h3 class="fn"><a name="toHash"></a><span class="type"><a href="qhash.html">QHash</a></span>&lt;<span class="type"><a href="qstring.html">QString</a></span>, <span class="type">QVariant</span>&gt; QVariant::<span class="name">toHash</span> () const</h3>
<p>Returns the variant as a <a href="qhash.html">QHash</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt; if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Hash</a>; otherwise returns an empty map.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toHash -->
<!-- $$$toInt[overload1]$$$toIntbool* -->
<h3 class="fn"><a name="toInt"></a><span class="type">int</span> QVariant::<span class="name">toInt</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as an int if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to an int; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p><b>Warning:</b> If the value is convertible to a <a href="qvariant.html#Type-enum">LongLong</a> but is too large to be represented in an int, the resulting arithmetic overflow will not be reflected in <i>ok</i>. A simple workaround is to use <a href="qstring.html#toInt">QString::toInt</a>(). Fixing this bug has been postponed to Qt 5 in order to avoid breaking existing code.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toInt -->
<!-- $$$toLine[overload1]$$$toLine -->
<h3 class="fn"><a name="toLine"></a><span class="type"><a href="qline.html">QLine</a></span> QVariant::<span class="name">toLine</span> () const</h3>
<p>Returns the variant as a <a href="qline.html">QLine</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Line</a>; otherwise returns an invalid <a href="qline.html">QLine</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toLine -->
<!-- $$$toLineF[overload1]$$$toLineF -->
<h3 class="fn"><a name="toLineF"></a><span class="type"><a href="qlinef.html">QLineF</a></span> QVariant::<span class="name">toLineF</span> () const</h3>
<p>Returns the variant as a <a href="qlinef.html">QLineF</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">LineF</a>; otherwise returns an invalid <a href="qlinef.html">QLineF</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toLineF -->
<!-- $$$toList[overload1]$$$toList -->
<h3 class="fn"><a name="toList"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QVariant</span>&gt; QVariant::<span class="name">toList</span> () const</h3>
<p>Returns the variant as a <a href="qvariant.html#QVariantList-typedef">QVariantList</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">List</a> or <a href="qvariant.html#Type-enum">StringList</a>; otherwise returns an empty list.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toList -->
<!-- $$$toLocale[overload1]$$$toLocale -->
<h3 class="fn"><a name="toLocale"></a><span class="type"><a href="qlocale.html">QLocale</a></span> QVariant::<span class="name">toLocale</span> () const</h3>
<p>Returns the variant as a <a href="qlocale.html">QLocale</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Locale</a>; otherwise returns an invalid <a href="qlocale.html">QLocale</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toLocale -->
<!-- $$$toLongLong[overload1]$$$toLongLongbool* -->
<h3 class="fn"><a name="toLongLong"></a><span class="type"><a href="qtglobal.html#qlonglong-typedef">qlonglong</a></span> QVariant::<span class="name">toLongLong</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as a long long int if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><tt>ok</tt> is set to true if the value could be converted to an int; otherwise <tt>*</tt><tt>ok</tt> is set to false.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toLongLong -->
<!-- $$$toMap[overload1]$$$toMap -->
<h3 class="fn"><a name="toMap"></a><span class="type"><a href="qmap.html">QMap</a></span>&lt;<span class="type"><a href="qstring.html">QString</a></span>, <span class="type">QVariant</span>&gt; QVariant::<span class="name">toMap</span> () const</h3>
<p>Returns the variant as a <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt; if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Map</a>; otherwise returns an empty map.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toMap -->
<!-- $$$toPoint[overload1]$$$toPoint -->
<h3 class="fn"><a name="toPoint"></a><span class="type"><a href="qpoint.html">QPoint</a></span> QVariant::<span class="name">toPoint</span> () const</h3>
<p>Returns the variant as a <a href="qpoint.html">QPoint</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Point</a> or <a href="qvariant.html#Type-enum">PointF</a>; otherwise returns a null <a href="qpoint.html">QPoint</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toPoint -->
<!-- $$$toPointF[overload1]$$$toPointF -->
<h3 class="fn"><a name="toPointF"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QVariant::<span class="name">toPointF</span> () const</h3>
<p>Returns the variant as a <a href="qpointf.html">QPointF</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Point</a> or <a href="qvariant.html#Type-enum">PointF</a>; otherwise returns a null <a href="qpointf.html">QPointF</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toPointF -->
<!-- $$$toReal[overload1]$$$toRealbool* -->
<h3 class="fn"><a name="toReal"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QVariant::<span class="name">toReal</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as a qreal if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Double</a>, <a href="qmetatype.html#Type-enum">QMetaType::Float</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.0&#x2e;</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to a double; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toReal -->
<!-- $$$toRect[overload1]$$$toRect -->
<h3 class="fn"><a name="toRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QVariant::<span class="name">toRect</span> () const</h3>
<p>Returns the variant as a <a href="qrect.html">QRect</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Rect</a>; otherwise returns an invalid <a href="qrect.html">QRect</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toRect -->
<!-- $$$toRectF[overload1]$$$toRectF -->
<h3 class="fn"><a name="toRectF"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QVariant::<span class="name">toRectF</span> () const</h3>
<p>Returns the variant as a <a href="qrectf.html">QRectF</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Rect</a> or <a href="qvariant.html#Type-enum">RectF</a>; otherwise returns an invalid <a href="qrectf.html">QRectF</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toRectF -->
<!-- $$$toRegExp[overload1]$$$toRegExp -->
<h3 class="fn"><a name="toRegExp"></a><span class="type"><a href="qregexp.html">QRegExp</a></span> QVariant::<span class="name">toRegExp</span> () const</h3>
<p>Returns the variant as a <a href="qregexp.html">QRegExp</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">RegExp</a>; otherwise returns an empty <a href="qregexp.html">QRegExp</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toRegExp -->
<!-- $$$toSize[overload1]$$$toSize -->
<h3 class="fn"><a name="toSize"></a><span class="type"><a href="qsize.html">QSize</a></span> QVariant::<span class="name">toSize</span> () const</h3>
<p>Returns the variant as a <a href="qsize.html">QSize</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Size</a>; otherwise returns an invalid <a href="qsize.html">QSize</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toSize -->
<!-- $$$toSizeF[overload1]$$$toSizeF -->
<h3 class="fn"><a name="toSizeF"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QVariant::<span class="name">toSizeF</span> () const</h3>
<p>Returns the variant as a <a href="qsizef.html">QSizeF</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">SizeF</a>; otherwise returns an invalid <a href="qsizef.html">QSizeF</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toSizeF -->
<!-- $$$toString[overload1]$$$toString -->
<h3 class="fn"><a name="toString"></a><span class="type"><a href="qstring.html">QString</a></span> QVariant::<span class="name">toString</span> () const</h3>
<p>Returns the variant as a <a href="qstring.html">QString</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">String</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Date</a>, <a href="qvariant.html#Type-enum">DateTime</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">StringList</a>, <a href="qvariant.html#Type-enum">Time</a>, <a href="qvariant.html#Type-enum">UInt</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns an empty string.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toString -->
<!-- $$$toStringList[overload1]$$$toStringList -->
<h3 class="fn"><a name="toStringList"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QVariant::<span class="name">toStringList</span> () const</h3>
<p>Returns the variant as a <a href="qstringlist.html">QStringList</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">StringList</a>, <a href="qvariant.html#Type-enum">String</a>, or <a href="qvariant.html#Type-enum">List</a> of a type that can be converted to <a href="qstring.html">QString</a>; otherwise returns an empty list.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toStringList -->
<!-- $$$toTime[overload1]$$$toTime -->
<h3 class="fn"><a name="toTime"></a><span class="type"><a href="qtime.html">QTime</a></span> QVariant::<span class="name">toTime</span> () const</h3>
<p>Returns the variant as a <a href="qtime.html">QTime</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Time</a>, <a href="qvariant.html#Type-enum">DateTime</a>, or <a href="qvariant.html#Type-enum">String</a>; otherwise returns an invalid time.</p>
<p>If the <a href="qvariant.html#type">type</a>() is <a href="qvariant.html#Type-enum">String</a>, an invalid time will be returned if the string cannot be parsed as a <a href="qt.html#DateFormat-enum">Qt::ISODate</a> format time.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toTime -->
<!-- $$$toUInt[overload1]$$$toUIntbool* -->
<h3 class="fn"><a name="toUInt"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> QVariant::<span class="name">toUInt</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as an unsigned int if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">UInt</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, or <a href="qvariant.html#Type-enum">ULongLong</a>; otherwise returns 0.</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to an unsigned int; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p><b>Warning:</b> If the value is convertible to a <a href="qvariant.html#Type-enum">ULongLong</a> but is too large to be represented in an unsigned int, the resulting arithmetic overflow will not be reflected in <i>ok</i>. A simple workaround is to use <a href="qstring.html#toUInt">QString::toUInt</a>(). Fixing this bug has been postponed to Qt 5 in order to avoid breaking existing code.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toUInt -->
<!-- $$$toULongLong[overload1]$$$toULongLongbool* -->
<h3 class="fn"><a name="toULongLong"></a><span class="type"><a href="qtglobal.html#qulonglong-typedef">qulonglong</a></span> QVariant::<span class="name">toULongLong</span> ( <span class="type">bool</span> * <i>ok</i> = 0 ) const</h3>
<p>Returns the variant as as an unsigned long long int if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">ULongLong</a>, <a href="qvariant.html#Type-enum">Bool</a>, <a href="qvariant.html#Type-enum">ByteArray</a>, <a href="qvariant.html#Type-enum">Char</a>, <a href="qvariant.html#Type-enum">Double</a>, <a href="qvariant.html#Type-enum">Int</a>, <a href="qvariant.html#Type-enum">LongLong</a>, <a href="qvariant.html#Type-enum">String</a>, or <a href="qvariant.html#Type-enum">UInt</a>; otherwise returns 0.</p>
<p>If <i>ok</i> is non-null: <tt>*</tt><i>ok</i> is set to true if the value could be converted to an int; otherwise <tt>*</tt><i>ok</i> is set to false.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toULongLong -->
<!-- $$$toUrl[overload1]$$$toUrl -->
<h3 class="fn"><a name="toUrl"></a><span class="type"><a href="qurl.html">QUrl</a></span> QVariant::<span class="name">toUrl</span> () const</h3>
<p>Returns the variant as a <a href="qurl.html">QUrl</a> if the variant has <a href="qvariant.html#type">type</a>() <a href="qvariant.html#Type-enum">Url</a>; otherwise returns an invalid <a href="qurl.html">QUrl</a>.</p>
<p><b>See also </b><a href="qvariant.html#canConvert">canConvert</a>() and <a href="qvariant.html#convert">convert</a>().</p>
<!-- @@@toUrl -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="qvariant.html#Type-enum">Type</a></span> QVariant::<span class="name">type</span> () const</h3>
<p>Returns the storage type of the value stored in the variant. Although this function is declared as returning <a href="qvariant.html#Type-enum">QVariant::Type</a>, the return value should be interpreted as <a href="qmetatype.html#Type-enum">QMetaType::Type</a>. In particular, <a href="qvariant.html#Type-enum">QVariant::UserType</a> is returned here only if the value is equal or greater than <a href="qmetatype.html#Type-enum">QMetaType::User</a>.</p>
<p>Note that return values in the ranges <a href="qvariant.html#Type-enum">QVariant::Char</a> through <a href="qvariant.html#Type-enum">QVariant::RegExp</a> and <a href="qvariant.html#Type-enum">QVariant::Font</a> through <a href="qvariant.html#Type-enum">QVariant::Transform</a> correspond to the values in the ranges <a href="qmetatype.html#Type-enum">QMetaType::QChar</a> through <a href="qmetatype.html#Type-enum">QMetaType::QRegExp</a> and <a href="qmetatype.html#Type-enum">QMetaType::QFont</a> through <a href="qmetatype.html#Type-enum">QMetaType::QQuaternion</a>.</p>
<p>Pay particular attention when working with char and <a href="qchar.html">QChar</a> variants. Note that there is no <a href="qvariant.html">QVariant</a> constructor specifically for type char, but there is one for <a href="qchar.html">QChar</a>. For a variant of type <a href="qchar.html">QChar</a>, this function returns <a href="qvariant.html#Type-enum">QVariant::Char</a>, which is the same as <a href="qmetatype.html#Type-enum">QMetaType::QChar</a>, but for a variant of type <tt>char</tt>, this function returns <a href="qmetatype.html#Type-enum">QMetaType::Char</a>, which is <i>not</i> the same as <a href="qvariant.html#Type-enum">QVariant::Char</a>.</p>
<p>Also note that the types <tt>void*</tt>, <tt>long</tt>, <tt>short</tt>, <tt>unsigned</tt> <tt>long</tt>, <tt>unsigned</tt> <tt>short</tt>, <tt>unsigned</tt> <tt>char</tt>, <tt>float</tt>, <tt>QObject*</tt>, and <tt>QWidget*</tt> are represented in <a href="qmetatype.html#Type-enum">QMetaType::Type</a> but not in <a href="qvariant.html#Type-enum">QVariant::Type</a>, and they can be returned by this function. However, they are considered to be user defined types when tested against <a href="qvariant.html#Type-enum">QVariant::Type</a>.</p>
<p>To test whether an instance of <a href="qvariant.html">QVariant</a> contains a data type that is compatible with the data type you are interested in, use <a href="qvariant.html#canConvert">canConvert</a>().</p>
<!-- @@@type -->
<!-- $$$typeName[overload1]$$$typeName -->
<h3 class="fn"><a name="typeName"></a>const <span class="type">char</span> * QVariant::<span class="name">typeName</span> () const</h3>
<p>Returns the name of the type stored in the variant. The returned strings describe the C++ datatype used to store the data: for example, &quot;<a href="qfont.html">QFont</a>&quot;, &quot;<a href="qstring.html">QString</a>&quot;, or &quot;<a href="qvariant.html#QVariantList-typedef">QVariantList</a>&quot;. An Invalid variant returns 0.</p>
<!-- @@@typeName -->
<!-- $$$typeToName[overload1]$$$typeToNameType -->
<h3 class="fn"><a name="typeToName"></a>const <span class="type">char</span> * QVariant::<span class="name">typeToName</span> ( <span class="type"><a href="qvariant.html#Type-enum">Type</a></span> <i>typ</i> )<tt> [static]</tt></h3>
<p>Converts the enum representation of the storage type, <i>typ</i>, to its string representation.</p>
<p>Returns a null pointer if the type is <a href="qvariant.html#Type-enum">QVariant::Invalid</a> or doesn't exist.</p>
<!-- @@@typeToName -->
<!-- $$$userType[overload1]$$$userType -->
<h3 class="fn"><a name="userType"></a><span class="type">int</span> QVariant::<span class="name">userType</span> () const</h3>
<p>Returns the storage type of the value stored in the variant. For non-user types, this is the same as <a href="qvariant.html#type">type</a>().</p>
<p><b>See also </b><a href="qvariant.html#type">type</a>().</p>
<!-- @@@userType -->
<!-- $$$value[overload1]$$$value -->
<h3 class="fn"><a name="value"></a><span class="type">T</span> QVariant::<span class="name">value</span> () const</h3>
<p>Returns the stored value converted to the template type <tt>T</tt>. Call <a href="qvariant.html#canConvert">canConvert</a>() to find out whether a type can be converted. If the value cannot be converted, <a href="containers.html#default-constructed-values">default-constructed value</a> will be returned.</p>
<p>If the type <tt>T</tt> is supported by <a href="qvariant.html">QVariant</a>, this function behaves exactly as <a href="qvariant.html#toString">toString</a>(), <a href="qvariant.html#toInt">toInt</a>() etc.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qvariant.html">QVariant</a></span> v;

 MyCustomStruct c;
 <span class="keyword">if</span> (v<span class="operator">.</span>canConvert<span class="operator">&lt;</span>MyCustomStruct<span class="operator">&gt;</span>())
     c <span class="operator">=</span> v<span class="operator">.</span>value<span class="operator">&lt;</span>MyCustomStruct<span class="operator">&gt;</span>();

 v <span class="operator">=</span> <span class="number">7</span>;
 <span class="type">int</span> i <span class="operator">=</span> v<span class="operator">.</span>value<span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span>();                        <span class="comment">// same as v.toInt()</span>
 <span class="type"><a href="qstring.html">QString</a></span> s <span class="operator">=</span> v<span class="operator">.</span>value<span class="operator">&lt;</span><span class="type"><a href="qstring.html">QString</a></span><span class="operator">&gt;</span>();                <span class="comment">// same as v.toString(), s is now &quot;7&quot;</span>
 MyCustomStruct c2 <span class="operator">=</span> v<span class="operator">.</span>value<span class="operator">&lt;</span>MyCustomStruct<span class="operator">&gt;</span>(); <span class="comment">// conversion failed, c2 is empty</span></pre>
<p><b>See also </b><a href="qvariant.html#setValue">setValue</a>(), <a href="qvariant.html#fromValue">fromValue</a>(), and <a href="qvariant.html#canConvert">canConvert</a>().</p>
<!-- @@@value -->
<!-- $$$operator!=[overload1]$$$operator!=constQVariant& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QVariant::<span class="name">operator!=</span> ( const <span class="type">QVariant</span> &amp; <i>v</i> ) const</h3>
<p>Compares this <a href="qvariant.html">QVariant</a> with <i>v</i> and returns true if they are not equal; otherwise returns false.</p>
<p><b>Warning:</b> This function doesn't support custom types registered with <a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQVariant& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QVariant</span> &amp; QVariant::<span class="name">operator=</span> ( const <span class="type">QVariant</span> &amp; <i>variant</i> )</h3>
<p>Assigns the value of the variant <i>variant</i> to this variant.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQVariant& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QVariant::<span class="name">operator==</span> ( const <span class="type">QVariant</span> &amp; <i>v</i> ) const</h3>
<p>Compares this <a href="qvariant.html">QVariant</a> with <i>v</i> and returns true if they are equal; otherwise returns false.</p>
<p>In the case of custom types, their equalness operators are not called. Instead the values' addresses are compared.</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$QVariantHash -->
<h3 class="fn"><a name="QVariantHash-typedef"></a>typedef <span class="name">QVariantHash</span></h3>
<p>Synonym for <a href="qhash.html">QHash</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt;.</p>
<p>This typedef was introduced in Qt 4.5.</p>
<!-- @@@QVariantHash -->
<!-- $$$QVariantList -->
<h3 class="fn"><a name="QVariantList-typedef"></a>typedef <span class="name">QVariantList</span></h3>
<p>Synonym for <a href="qlist.html">QList</a>&lt;<a href="qvariant.html">QVariant</a>&gt;.</p>
<!-- @@@QVariantList -->
<!-- $$$QVariantMap -->
<h3 class="fn"><a name="QVariantMap-typedef"></a>typedef <span class="name">QVariantMap</span></h3>
<p>Synonym for <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt;.</p>
<!-- @@@QVariantMap -->
<!-- $$$qvariant_cast[overload1]$$$qvariant_castconstQVariant& -->
<h3 class="fn"><a name="qvariant_cast"></a><span class="type">T</span> <span class="name">qvariant_cast</span> ( const <span class="type">QVariant</span> &amp; <i>value</i> )</h3>
<p>Returns the given <i>value</i> converted to the template type <tt>T</tt>.</p>
<p>This function is equivalent to <a href="qvariant.html#value">QVariant::value</a>().</p>
<p><b>See also </b><a href="qvariant.html#value">QVariant::value</a>().</p>
<!-- @@@qvariant_cast -->
<!-- $$$operator!=$$$operator!=constQVariant&constQVariant& -->
<h3 class="fn"><a name="operator-not-eq-3"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">QVariant</span> &amp; <i>v1</i>, const <span class="type">QVariant</span> &amp; <i>v2</i> )</h3>
<p>Returns false if <i>v1</i> and <i>v2</i> are equal; otherwise returns true.</p>
<p><b>Warning:</b> This function doesn't support custom types registered with <a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator==$$$operator==constQVariant&constQVariant& -->
<h3 class="fn"><a name="operator-eq-eq-3"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">QVariant</span> &amp; <i>v1</i>, const <span class="type">QVariant</span> &amp; <i>v2</i> )</h3>
<p>Returns true if <i>v1</i> and <i>v2</i> are equal; otherwise returns false.</p>
<p><b>Warning:</b> This function doesn't support custom types registered with <a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>().</p>
<!-- @@@operator== -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <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>