<?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" /> <!-- q3sqlform.cpp --> <title>Qt 4.8: Q3SqlForm 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 & 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> 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 & 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="qt3support.html">Qt3Support</a></li> <li>Q3SqlForm</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-functions">Public Functions</a></li> <li class="level1"><a href="#public-slots">Public Slots</a></li> <li class="level1"><a href="#protected-functions">Protected Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">Q3SqlForm Class Reference</h1> <!-- $$$Q3SqlForm-brief --> <p>The Q3SqlForm class creates and manages data entry forms tied to SQL databases. <a href="#details">More...</a></p> <!-- @@@Q3SqlForm --> <pre class="cpp"> <span class="preprocessor">#include <Q3SqlForm></span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qsqlform">Porting to Qt 4</a> for more information.</p> <p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p> <ul> <li><a href="q3sqlform-members.html">List of all members, including inherited members</a></li> </ul> <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="q3sqlform.html#Q3SqlForm">Q3SqlForm</a></b> ( QObject * <i>parent</i> = 0 )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#dtor.Q3SqlForm">~Q3SqlForm</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#count">count</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#fieldToWidget">fieldToWidget</a></b> ( QSqlField * <i>field</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#insert">insert</a></b> ( QWidget * <i>widget</i>, const QString & <i>field</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#installPropertyMap">installPropertyMap</a></b> ( Q3SqlPropertyMap * <i>pmap</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#remove-2">remove</a></b> ( const QString & <i>field</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#setRecord">setRecord</a></b> ( QSqlRecord * <i>buf</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#widget">widget</a></b> ( int <i>i</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSqlField * </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#widgetToField">widgetToField</a></b> ( QWidget * <i>widget</i> ) const</td></tr> </table> <ul> <li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> </ul> <a name="public-slots"></a> <h2>Public Slots</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#clear">clear</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#clearValues">clearValues</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#readField">readField</a></b> ( QWidget * <i>widget</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#readFields">readFields</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#writeField">writeField</a></b> ( QWidget * <i>widget</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#writeFields">writeFields</a></b> ()</td></tr> </table> <ul> <li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li> </ul> <a name="protected-functions"></a> <h2>Protected Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#insert-2">insert</a></b> ( QWidget * <i>widget</i>, QSqlField * <i>field</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3sqlform.html#remove">remove</a></b> ( QWidget * <i>widget</i> )</td></tr> </table> <ul> <li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li> <li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li> <li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li> </ul> <a name="details"></a> <!-- $$$Q3SqlForm-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The Q3SqlForm class creates and manages data entry forms tied to SQL databases.</p> <p>Typical use of a Q3SqlForm consists of the following steps:</p> <ul> <li>Create the widgets you want to appear in the form.</li> <li>Create a cursor and navigate to the record to be edited.</li> <li>Create the Q3SqlForm.</li> <li>Set the form's record buffer to the cursor's update buffer.</li> <li>Insert each widget and the field it is to edit into the form.</li> <li>Use <a href="q3sqlform.html#readFields">readFields</a>() to update the editor widgets with values from the database's fields.</li> <li>Display the form and let the user edit values etc.</li> <li>Use <a href="q3sqlform.html#writeFields">writeFields</a>() to update the database's field values with the values in the editor widgets.</li> </ul> <p>Note that a Q3SqlForm does not access the database directly, but most often via QSqlFields which are part of a <a href="q3sqlcursor.html">Q3SqlCursor</a>. A <a href="q3sqlcursor.html#insert">Q3SqlCursor::insert</a>(), <a href="q3sqlcursor.html#update">Q3SqlCursor::update</a>() or <a href="q3sqlcursor.html#del">Q3SqlCursor::del</a>() call is needed to actually write values to the database.</p> <p>Some sample code to initialize a form successfully:</p> <pre class="cpp"> <span class="type"><a href="qlineedit.html">QLineEdit</a></span> myEditor(<span class="keyword">this</span>); <span class="type">Q3SqlForm</span> myForm(<span class="keyword">this</span>); <span class="type"><a href="q3sqlcursor.html">Q3SqlCursor</a></span> myCursor(<span class="string">"mytable"</span>); <span class="comment">// Execute a query to make the cursor valid</span> myCursor<span class="operator">.</span>select(); <span class="comment">// Move the cursor to a valid record (the first record)</span> myCursor<span class="operator">.</span>next(); <span class="comment">// Set the form's record pointer to the cursor's edit buffer (which</span> <span class="comment">// contains the current record's values)</span> myForm<span class="operator">.</span><a href="q3sqlform.html#setRecord">setRecord</a>(myCursor<span class="operator">.</span>primeUpdate()); <span class="comment">// Insert a field into the form that uses myEditor to edit the</span> <span class="comment">// field 'somefield' in 'mytable'</span> myForm<span class="operator">.</span><a href="q3sqlform.html#insert">insert</a>(<span class="operator">&</span>myEditor<span class="operator">,</span> <span class="string">"somefield"</span>); <span class="comment">// Update myEditor with the value from the mapped database field</span> myForm<span class="operator">.</span><a href="q3sqlform.html#readFields">readFields</a>(); <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <span class="comment">// Let the user edit the form</span> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> <span class="comment">// Update the database</span> myForm<span class="operator">.</span><a href="q3sqlform.html#writeFields">writeFields</a>(); <span class="comment">// Update the cursor's edit buffer from the form</span> myCursor<span class="operator">.</span>update(); <span class="comment">// Update the database from the cursor's buffer</span></pre> <p>If you want to use custom editors for displaying and editing data fields, you must install a custom <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a>. The form uses this object to get or set the value of a widget.</p> </div> <p><b>See also </b><a href="q3sqlform.html#installPropertyMap">installPropertyMap</a>() and <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a>.</p> <!-- @@@Q3SqlForm --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$Q3SqlForm[overload1]$$$Q3SqlFormQObject* --> <h3 class="fn"><a name="Q3SqlForm"></a>Q3SqlForm::<span class="name">Q3SqlForm</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3> <p>Constructs a <a href="q3sqlform.html" class="compat">Q3SqlForm</a> with parent <i>parent</i>.</p> <!-- @@@Q3SqlForm --> <!-- $$$~Q3SqlForm[overload1]$$$~Q3SqlForm --> <h3 class="fn"><a name="dtor.Q3SqlForm"></a>Q3SqlForm::<span class="name">~Q3SqlForm</span> ()</h3> <p>Destroys the object and frees any allocated resources.</p> <!-- @@@~Q3SqlForm --> <!-- $$$clear[overload1]$$$clear --> <h3 class="fn"><a name="clear"></a><span class="type">void</span> Q3SqlForm::<span class="name">clear</span> ()<tt> [virtual slot]</tt></h3> <p>Removes every widget, and the fields they're mapped to, from the form.</p> <!-- @@@clear --> <!-- $$$clearValues[overload1]$$$clearValues --> <h3 class="fn"><a name="clearValues"></a><span class="type">void</span> Q3SqlForm::<span class="name">clearValues</span> ()<tt> [virtual slot]</tt></h3> <p>Clears the values in all the widgets, and the fields they are mapped to, in the form, and sets them to NULL.</p> <!-- @@@clearValues --> <!-- $$$count[overload1]$$$count --> <h3 class="fn"><a name="count"></a><span class="type">int</span> Q3SqlForm::<span class="name">count</span> () const</h3> <p>Returns the number of widgets in the form.</p> <!-- @@@count --> <!-- $$$fieldToWidget[overload1]$$$fieldToWidgetQSqlField* --> <h3 class="fn"><a name="fieldToWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * Q3SqlForm::<span class="name">fieldToWidget</span> ( <span class="type"><a href="qsqlfield.html">QSqlField</a></span> * <i>field</i> ) const</h3> <p>Returns the widget that field <i>field</i> is mapped to.</p> <!-- @@@fieldToWidget --> <!-- $$$insert[overload1]$$$insertQWidget*constQString& --> <h3 class="fn"><a name="insert"></a><span class="type">void</span> Q3SqlForm::<span class="name">insert</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <i>field</i> )<tt> [virtual]</tt></h3> <p>Inserts a <i>widget</i>, and the name of the <i>field</i> it is to be mapped to, into the form. To actually associate inserted widgets with an edit buffer, use <a href="q3sqlform.html#setRecord">setRecord</a>().</p> <p><b>See also </b><a href="q3sqlform.html#setRecord">setRecord</a>().</p> <!-- @@@insert --> <!-- $$$insert$$$insertQWidget*QSqlField* --> <h3 class="fn"><a name="insert-2"></a><span class="type">void</span> Q3SqlForm::<span class="name">insert</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i>, <span class="type"><a href="qsqlfield.html">QSqlField</a></span> * <i>field</i> )<tt> [virtual protected]</tt></h3> <p>This is an overloaded function.</p> <p>Inserts a <i>widget</i>, and the <i>field</i> it is to be mapped to, into the form.</p> <!-- @@@insert --> <!-- $$$installPropertyMap[overload1]$$$installPropertyMapQ3SqlPropertyMap* --> <h3 class="fn"><a name="installPropertyMap"></a><span class="type">void</span> Q3SqlForm::<span class="name">installPropertyMap</span> ( <span class="type"><a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a></span> * <i>pmap</i> )</h3> <p>Installs a custom <a href="q3sqlpropertymap.html" class="compat">Q3SqlPropertyMap</a>. This is useful if you plan to create your own custom editor widgets.</p> <p><a href="q3sqlform.html" class="compat">Q3SqlForm</a> takes ownership of <i>pmap</i>, so <i>pmap</i> is deleted when <a href="q3sqlform.html" class="compat">Q3SqlForm</a> goes out of scope.</p> <p><b>See also </b><a href="q3datatable.html#installEditorFactory">Q3DataTable::installEditorFactory</a>().</p> <!-- @@@installPropertyMap --> <!-- $$$readField[overload1]$$$readFieldQWidget* --> <h3 class="fn"><a name="readField"></a><span class="type">void</span> Q3SqlForm::<span class="name">readField</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [virtual slot]</tt></h3> <p>Updates the widget <i>widget</i> with the value from the SQL field it is mapped to. Nothing happens if no SQL field is mapped to the <i>widget</i>.</p> <!-- @@@readField --> <!-- $$$readFields[overload1]$$$readFields --> <h3 class="fn"><a name="readFields"></a><span class="type">void</span> Q3SqlForm::<span class="name">readFields</span> ()<tt> [virtual slot]</tt></h3> <p>Updates the widgets in the form with current values from the SQL fields they are mapped to.</p> <!-- @@@readFields --> <!-- $$$remove[overload1]$$$removeQWidget* --> <h3 class="fn"><a name="remove"></a><span class="type">void</span> Q3SqlForm::<span class="name">remove</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [virtual protected]</tt></h3> <p>Removes a <i>widget</i>, and hence the field it's mapped to, from the form.</p> <!-- @@@remove --> <!-- $$$remove$$$removeconstQString& --> <h3 class="fn"><a name="remove-2"></a><span class="type">void</span> Q3SqlForm::<span class="name">remove</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>field</i> )<tt> [virtual]</tt></h3> <p>This is an overloaded function.</p> <p>Removes <i>field</i> from the form.</p> <!-- @@@remove --> <!-- $$$setRecord[overload1]$$$setRecordQSqlRecord* --> <h3 class="fn"><a name="setRecord"></a><span class="type">void</span> Q3SqlForm::<span class="name">setRecord</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [virtual]</tt></h3> <p>Sets <i>buf</i> as the record buffer for the form. To force the display of the data from <i>buf</i>, use <a href="q3sqlform.html#readFields">readFields</a>().</p> <p><b>See also </b><a href="q3sqlform.html#readFields">readFields</a>() and <a href="q3sqlform.html#writeFields">writeFields</a>().</p> <!-- @@@setRecord --> <!-- $$$widget[overload1]$$$widgetint --> <h3 class="fn"><a name="widget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * Q3SqlForm::<span class="name">widget</span> ( <span class="type">int</span> <i>i</i> ) const</h3> <p>Returns the <i>i</i>-th widget in the form. Useful for traversing the widgets in the form.</p> <!-- @@@widget --> <!-- $$$widgetToField[overload1]$$$widgetToFieldQWidget* --> <h3 class="fn"><a name="widgetToField"></a><span class="type"><a href="qsqlfield.html">QSqlField</a></span> * Q3SqlForm::<span class="name">widgetToField</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> ) const</h3> <p>Returns the SQL field that widget <i>widget</i> is mapped to.</p> <!-- @@@widgetToField --> <!-- $$$writeField[overload1]$$$writeFieldQWidget* --> <h3 class="fn"><a name="writeField"></a><span class="type">void</span> Q3SqlForm::<span class="name">writeField</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [virtual slot]</tt></h3> <p>Updates the SQL field with the value from the <i>widget</i> it is mapped to. Nothing happens if no SQL field is mapped to the <i>widget</i>.</p> <!-- @@@writeField --> <!-- $$$writeFields[overload1]$$$writeFields --> <h3 class="fn"><a name="writeFields"></a><span class="type">void</span> Q3SqlForm::<span class="name">writeFields</span> ()<tt> [virtual slot]</tt></h3> <p>Updates the SQL fields with values from the widgets they are mapped to. To actually update the database with the contents of the record buffer, use <a href="q3sqlcursor.html#insert">Q3SqlCursor::insert</a>(), <a href="q3sqlcursor.html#update">Q3SqlCursor::update</a>() or <a href="q3sqlcursor.html#del">Q3SqlCursor::del</a>() as appropriate.</p> <!-- @@@writeFields --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>