Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1021

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSqlField Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSqlField Class Reference<br /><sup><sup>[<a href="qtsql.html">QtSql</a> module]</sup></sup></h1><p>The QSqlField class manipulates the fields in SQL database
tables and views. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qsqlfield.html#RequiredStatus-enum">RequiredStatus</a></b> { Unknown, Optional, Required }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsqlfield.html#QSqlField">__init__</a></b> (<i>self</i>, QString&#160;<i>fieldName</i>&#160;=&#160;QString(), Type&#160;<i>type</i>&#160;=&#160;QVariant.Invalid)</li><li><div class="fn" /><b><a href="qsqlfield.html#QSqlField-2">__init__</a></b> (<i>self</i>, QSqlField&#160;<i>other</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qsqlfield.html#defaultValue">defaultValue</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#isAutoValue">isAutoValue</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#isGenerated">isGenerated</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#isReadOnly">isReadOnly</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsqlfield.html#length">length</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qsqlfield.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsqlfield.html#precision">precision</a></b> (<i>self</i>)</li><li><div class="fn" />RequiredStatus <b><a href="qsqlfield.html#requiredStatus">requiredStatus</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setAutoValue">setAutoValue</a></b> (<i>self</i>, bool&#160;<i>autoVal</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setDefaultValue">setDefaultValue</a></b> (<i>self</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setGenerated">setGenerated</a></b> (<i>self</i>, bool&#160;<i>gen</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setLength">setLength</a></b> (<i>self</i>, int&#160;<i>fieldLength</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setName">setName</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setPrecision">setPrecision</a></b> (<i>self</i>, int&#160;<i>precision</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setReadOnly">setReadOnly</a></b> (<i>self</i>, bool&#160;<i>readOnly</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setRequired">setRequired</a></b> (<i>self</i>, bool&#160;<i>required</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a></b> (<i>self</i>, RequiredStatus&#160;<i>status</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setSqlType">setSqlType</a></b> (<i>self</i>, int&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setType">setType</a></b> (<i>self</i>, Type&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qsqlfield.html#setValue">setValue</a></b> (<i>self</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" />Type <b><a href="qsqlfield.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsqlfield.html#typeID">typeID</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qsqlfield.html#value">value</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qsqlfield.html#__eq__">__eq__</a></b> (<i>self</i>, QSqlField&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="qsqlfield.html#__ne__">__ne__</a></b> (<i>self</i>, QSqlField&#160;<i>other</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSqlField class manipulates the fields in SQL database
tables and views.</p>
<p>QSqlField represents the characteristics of a single column in a
database table or view, such as the data type and column name. A
field also contains the value of the database column, which can be
viewed or changed.</p>
<p>Field data values are stored as <a href="qtwebkit-bridge.html#qvariants">QVariants</a>. Using an
incompatible type is not permitted. For example:</p>
<pre class="cpp">
     <span class="type">QSqlField</span> field(<span class="string">"age"</span><span class="operator">,</span> <span class="type"><a href="qvariant.html">QVariant</a></span><span class="operator">.</span>Int);
     field<span class="operator">.</span>setValue(<span class="type"><a href="qpixmap.html">QPixmap</a></span>());  <span class="comment">// WRONG</span>
</pre>
<p>However, the field will attempt to cast certain data types to
the field data type where possible:</p>
<pre class="cpp">
     <span class="type">QSqlField</span> field(<span class="string">"age"</span><span class="operator">,</span> <span class="type"><a href="qvariant.html">QVariant</a></span><span class="operator">.</span>Int);
     field<span class="operator">.</span>setValue(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"123"</span>));  <span class="comment">// casts QString to int</span>
</pre>
<p>QSqlField objects are rarely created explicitly in application
code. They are usually accessed indirectly through <a href="qsqlrecord.html">QSqlRecord</a>s that already contain a list of
fields. For example:</p>
<pre class="cpp">
     <span class="type"><a href="qsqlquery.html">QSqlQuery</a></span> query;
     ...
     <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> record <span class="operator">=</span> query<span class="operator">.</span>record();
     <span class="type">QSqlField</span> field <span class="operator">=</span> record<span class="operator">.</span>field(<span class="string">"country"</span>);
</pre>
<p>A QSqlField object can provide some meta-data about the field,
for example, its <a href="qsqlfield.html#name">name</a>(), variant
<a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#precision">precision</a>(), <a href="qsqlfield.html#defaultValue">defaultValue</a>(), typeID(), and its
<a href="qsqlfield.html#requiredStatus">requiredStatus</a>(),
<a href="qsqlfield.html#isGenerated">isGenerated</a>() and <a href="qsqlfield.html#isReadOnly">isReadOnly</a>(). The field's data can
be checked to see if it <a href="qsqlfield.html#isNull">isNull</a>(), and its <a href="qsqlfield.html#value">value</a>() retrieved. When editing the data
can be set with <a href="qsqlfield.html#setValue">setValue</a>() or
set to NULL with <a href="qsqlfield.html#clear">clear</a>().</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="RequiredStatus-enum" />QSqlField.RequiredStatus</h3><p>Specifies whether the field is required or optional.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSqlField.Required</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The field must be specified when inserting
records.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSqlField.Optional</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The fields doesn't have to be specified when
inserting records.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSqlField.Unknown</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">The database driver couldn't determine whether
the field is required or optional.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsqlfield.html#requiredStatus">requiredStatus</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSqlField" />QSqlField.__init__ (<i>self</i>, QString&#160;<i>fieldName</i>&#160;=&#160;QString(), <a href="qtcore.html#Type-enum">Type</a>&#160;<i>type</i>&#160;=&#160;QVariant.Invalid)</h3><p>Constructs an empty field called <i>fieldName</i> of variant
type <i>type</i>.</p>
<p><b>See also</b> <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="QSqlField-2" />QSqlField.__init__ (<i>self</i>, <a href="qsqlfield.html">QSqlField</a>&#160;<i>other</i>)</h3><p>Constructs a copy of <i>other</i>.</p>


<h3 class="fn"><a name="clear" />QSqlField.clear (<i>self</i>)</h3><p>Clears the value of the field and sets it to NULL. If the field
is read-only, nothing happens.</p>
<p><b>See also</b> <a href="qsqlfield.html#setValue">setValue</a>(), <a href="qsqlfield.html#isReadOnly">isReadOnly</a>(), and <a href="qsqlfield.html#requiredStatus">requiredStatus</a>().</p>


<h3 class="fn"><a name="defaultValue" />QVariant QSqlField.defaultValue (<i>self</i>)</h3><p>Returns the field's default value (which may be NULL).</p>
<p><b>See also</b> <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#precision">precision</a>(), and <a href="qsqlfield.html#isGenerated">isGenerated</a>().</p>


<h3 class="fn"><a name="isAutoValue" />bool QSqlField.isAutoValue (<i>self</i>)</h3><p>Returns true if the value is auto-generated by the database, for
example auto-increment primary key values.</p>
<p><b>See also</b> <a href="qsqlfield.html#setAutoValue">setAutoValue</a>().</p>


<h3 class="fn"><a name="isGenerated" />bool QSqlField.isGenerated (<i>self</i>)</h3><p>Returns true if the field is generated; otherwise returns
false.</p>
<p><b>See also</b> <a href="qsqlfield.html#setGenerated">setGenerated</a>(), <a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#precision">precision</a>(), and <a href="qsqlfield.html#defaultValue">defaultValue</a>().</p>


<h3 class="fn"><a name="isNull" />bool QSqlField.isNull (<i>self</i>)</h3><p>Returns true if the field's value is NULL; otherwise returns
false.</p>
<p><b>See also</b> <a href="qsqlfield.html#value">value</a>().</p>


<h3 class="fn"><a name="isReadOnly" />bool QSqlField.isReadOnly (<i>self</i>)</h3><p>Returns true if the field's value is read-only; otherwise
returns false.</p>
<p><b>See also</b> <a href="qsqlfield.html#setReadOnly">setReadOnly</a>(), <a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#precision">precision</a>(), <a href="qsqlfield.html#defaultValue">defaultValue</a>(), and <a href="qsqlfield.html#isGenerated">isGenerated</a>().</p>


<h3 class="fn"><a name="isValid" />bool QSqlField.isValid (<i>self</i>)</h3><p>Returns true if the field's variant type is valid; otherwise
returns false.</p>


<h3 class="fn"><a name="length" />int QSqlField.length (<i>self</i>)</h3><p>Returns the field's length.</p>
<p>If the returned value is negative, it means that the information
is not available from the database.</p>
<p><b>See also</b> <a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#precision">precision</a>(), <a href="qsqlfield.html#defaultValue">defaultValue</a>(), and <a href="qsqlfield.html#isGenerated">isGenerated</a>().</p>


<h3 class="fn"><a name="name" />QString QSqlField.name (<i>self</i>)</h3><p>Returns the name of the field.</p>
<p><b>See also</b> <a href="qsqlfield.html#setName">setName</a>().</p>


<h3 class="fn"><a name="precision" />int QSqlField.precision (<i>self</i>)</h3><p>Returns the field's precision; this is only meaningful for
numeric types.</p>
<p>If the returned value is negative, it means that the information
is not available from the database.</p>
<p><b>See also</b> <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#defaultValue">defaultValue</a>(), and <a href="qsqlfield.html#isGenerated">isGenerated</a>().</p>


<h3 class="fn"><a name="requiredStatus" /><a href="qsqlfield.html#RequiredStatus-enum">RequiredStatus</a> QSqlField.requiredStatus (<i>self</i>)</h3><p>Returns true if this is a required field; otherwise returns
false. An <tt>INSERT</tt> will fail if a required field does not
have a value.</p>
<p><b>See also</b> <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#type">type</a>(), <a href="qsqlfield.html#length">length</a>(), <a href="qsqlfield.html#precision">precision</a>(), <a href="qsqlfield.html#defaultValue">defaultValue</a>(), and <a href="qsqlfield.html#isGenerated">isGenerated</a>().</p>


<h3 class="fn"><a name="setAutoValue" />QSqlField.setAutoValue (<i>self</i>, bool&#160;<i>autoVal</i>)</h3><p>Marks the field as an auto-generated value if <i>autoVal</i> is
true.</p>
<p><b>See also</b> <a href="qsqlfield.html#isAutoValue">isAutoValue</a>().</p>


<h3 class="fn"><a name="setDefaultValue" />QSqlField.setDefaultValue (<i>self</i>, QVariant&#160;<i>value</i>)</h3><p>Sets the default value used for this field to <i>value</i>.</p>
<p><b>See also</b> <a href="qsqlfield.html#defaultValue">defaultValue</a>(), <a href="qsqlfield.html#value">value</a>(), <a href="qsqlfield.html#setType">setType</a>(), <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setGenerated" />QSqlField.setGenerated (<i>self</i>, bool&#160;<i>gen</i>)</h3><p>Sets the generated state. If <i>gen</i> is false, no SQL will be
generated for this field; otherwise, Qt classes such as <a href="qsqlquerymodel.html">QSqlQueryModel</a> and <a href="qsqltablemodel.html">QSqlTableModel</a> will generate SQL for this
field.</p>
<p><b>See also</b> <a href="qsqlfield.html#isGenerated">isGenerated</a>(), <a href="qsqlfield.html#setType">setType</a>(), <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), and
<a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setLength" />QSqlField.setLength (<i>self</i>, int&#160;<i>fieldLength</i>)</h3><p>Sets the field's length to <i>fieldLength</i>. For strings this
is the maximum number of characters the string can hold; the
meaning varies for other types.</p>
<p><b>See also</b> <a href="qsqlfield.html#length">length</a>(),
<a href="qsqlfield.html#setType">setType</a>(), <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setName" />QSqlField.setName (<i>self</i>, QString&#160;<i>name</i>)</h3><p>Sets the name of the field to <i>name</i>.</p>
<p><b>See also</b> <a href="qsqlfield.html#name">name</a>().</p>


<h3 class="fn"><a name="setPrecision" />QSqlField.setPrecision (<i>self</i>, int&#160;<i>precision</i>)</h3><p>Sets the field's <i>precision</i>. This only affects numeric
fields.</p>
<p><b>See also</b> <a href="qsqlfield.html#precision">precision</a>(), <a href="qsqlfield.html#setType">setType</a>(), <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setReadOnly" />QSqlField.setReadOnly (<i>self</i>, bool&#160;<i>readOnly</i>)</h3><p>Sets the read only flag of the field's value to <i>readOnly</i>.
A read-only field cannot have its value set with <a href="qsqlfield.html#setValue">setValue</a>() and cannot be cleared to
NULL with <a href="qsqlfield.html#clear">clear</a>().</p>
<p><b>See also</b> <a href="qsqlfield.html#isReadOnly">isReadOnly</a>().</p>


<h3 class="fn"><a name="setRequired" />QSqlField.setRequired (<i>self</i>, bool&#160;<i>required</i>)</h3><p>Sets the required status of this field to <a href="qsqlfield.html#RequiredStatus-enum">Required</a> if
<i>required</i> is true; otherwise sets it to <a href="qsqlfield.html#RequiredStatus-enum">Optional</a>.</p>
<p><b>See also</b> <a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>() and
<a href="qsqlfield.html#requiredStatus">requiredStatus</a>().</p>


<h3 class="fn"><a name="setRequiredStatus" />QSqlField.setRequiredStatus (<i>self</i>, <a href="qsqlfield.html#RequiredStatus-enum">RequiredStatus</a>&#160;<i>status</i>)</h3><p>Sets the required status of this field to <i>required</i>.</p>
<p><b>See also</b> <a href="qsqlfield.html#requiredStatus">requiredStatus</a>(), <a href="qsqlfield.html#setType">setType</a>(), <a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setSqlType" />QSqlField.setSqlType (<i>self</i>, int&#160;<i>type</i>)</h3><h3 class="fn"><a name="setType" />QSqlField.setType (<i>self</i>, <a href="qtcore.html#Type-enum">Type</a>&#160;<i>type</i>)</h3><p>Set's the field's variant type to <i>type</i>.</p>
<p><b>See also</b> <a href="qsqlfield.html#type">type</a>(),
<a href="qsqlfield.html#setRequiredStatus">setRequiredStatus</a>(),
<a href="qsqlfield.html#setLength">setLength</a>(), <a href="qsqlfield.html#setPrecision">setPrecision</a>(), <a href="qsqlfield.html#setDefaultValue">setDefaultValue</a>(), <a href="qsqlfield.html#setGenerated">setGenerated</a>(), and <a href="qsqlfield.html#setReadOnly">setReadOnly</a>().</p>


<h3 class="fn"><a name="setValue" />QSqlField.setValue (<i>self</i>, QVariant&#160;<i>value</i>)</h3><p>Sets the value of the field to <i>value</i>. If the field is
read-only (<a href="qsqlfield.html#isReadOnly">isReadOnly</a>()
returns true), nothing happens.</p>
<p>If the data type of <i>value</i> differs from the field's
current data type, an attempt is made to cast it to the proper
type. This preserves the data type of the field in the case of
assignment, e.g. a <a href="qstring.html">QString</a> to an integer
data type.</p>
<p>To set the value to NULL, use <a href="qsqlfield.html#clear">clear</a>().</p>
<p><b>See also</b> <a href="qsqlfield.html#value">value</a>(),
<a href="qsqlfield.html#isReadOnly">isReadOnly</a>(), and <a href="qsqlfield.html#defaultValue">defaultValue</a>().</p>


<h3 class="fn"><a name="type" /><a href="qtcore.html#Type-enum">Type</a> QSqlField.type (<i>self</i>)</h3><p>Returns the field's type as stored in the database. Note that
the actual value might have a different type, Numerical values that
are too large to store in a long int or double are usually stored
as strings to prevent precision loss.</p>
<p><b>See also</b> <a href="qsqlfield.html#setType">setType</a>().</p>


<h3 class="fn"><a name="typeID" />int QSqlField.typeID (<i>self</i>)</h3><h3 class="fn"><a name="value" />QVariant QSqlField.value (<i>self</i>)</h3><p>Returns the value of the field as a <a href="qvariant.html">QVariant</a>.</p>
<p>Use <a href="qsqlfield.html#isNull">isNull</a>() to check if the
field's value is NULL.</p>
<p><b>See also</b> <a href="qsqlfield.html#setValue">setValue</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QSqlField.__eq__ (<i>self</i>, <a href="qsqlfield.html">QSqlField</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QSqlField.__ne__ (<i>self</i>, <a href="qsqlfield.html">QSqlField</a>&#160;<i>other</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>