Sophie

Sophie

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

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

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qspinbox.cpp -->
  <title>QDoubleSpinBox Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QDoubleSpinBox</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDoubleSpinBox Class</h1>
<!-- $$$QDoubleSpinBox-brief -->
<p>The <a href="qdoublespinbox.html">QDoubleSpinBox</a> class provides a spin box widget that takes doubles. <a href="#details">More...</a></p>
<!-- @@@QDoubleSpinBox -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDoubleSpinBox&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qabstractspinbox.html">QAbstractSpinBox</a></td></tr></table></div><ul>
<li><a href="qdoublespinbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qdoublespinbox.html#cleanText-prop">cleanText</a></b> : const QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#decimals-prop">decimals</a></b> : int</li>
<li class="fn"><b><a href="qdoublespinbox.html#maximum-prop">maximum</a></b> : double</li>
<li class="fn"><b><a href="qdoublespinbox.html#minimum-prop">minimum</a></b> : double</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qdoublespinbox.html#prefix-prop">prefix</a></b> : QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#singleStep-prop">singleStep</a></b> : double</li>
<li class="fn"><b><a href="qdoublespinbox.html#suffix-prop">suffix</a></b> : QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#value-prop">value</a></b> : double</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">12 properties inherited from <a href="qabstractspinbox.html#properties">QAbstractSpinBox</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></b>(QWidget *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#dtor.QDoubleSpinBox">~QDoubleSpinBox</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#cleanText-prop">cleanText</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#decimals-prop">decimals</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#maximum-prop">maximum</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#minimum-prop">minimum</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#prefix-prop">prefix</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#decimals-prop">setDecimals</a></b>(int <i>prec</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#maximum-prop">setMaximum</a></b>(double <i>max</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#minimum-prop">setMinimum</a></b>(double <i>min</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#prefix-prop">setPrefix</a></b>(const QString &amp;<i>prefix</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#setRange">setRange</a></b>(double <i>minimum</i>, double <i>maximum</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a></b>(double <i>val</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#suffix-prop">setSuffix</a></b>(const QString &amp;<i>suffix</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#singleStep-prop">singleStep</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#suffix-prop">suffix</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#textFromValue">textFromValue</a></b>(double <i>value</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#value-prop">value</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueFromText">valueFromText</a></b>(const QString &amp;<i>text</i>) const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#fixup">fixup</a></b>(QString &amp;<i>input</i>) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QValidator::State </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#validate">validate</a></b>(QString &amp;<i>text</i>, int &amp;<i>pos</i>) const override</td></tr>
</table></div>
<ul>
<li class="fn">30 public functions inherited from <a href="qabstractspinbox.html#public-functions">QAbstractSpinBox</a></li>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#value-prop">setValue</a></b>(double <i>val</i>)</td></tr>
</table></div>
<ul>
<li class="fn">4 public slots inherited from <a href="qabstractspinbox.html#public-slots">QAbstractSpinBox</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueChanged">valueChanged</a></b>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueChanged-1">valueChanged</a></b>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<ul>
<li class="fn">1 signal inherited from <a href="qabstractspinbox.html#signals">QAbstractSpinBox</a></li>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">20 protected functions inherited from <a href="qabstractspinbox.html#protected-functions">QAbstractSpinBox</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
<li class="fn">1 protected type inherited from <a href="../qtgui/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDoubleSpinBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdoublespinbox.html">QDoubleSpinBox</a> class provides a spin box widget that takes doubles.</p>
<p><a href="qdoublespinbox.html">QDoubleSpinBox</a> allows the user to choose a value by clicking the up and down buttons or by pressing Up or Down on the keyboard to increase or decrease the value currently displayed. The user can also type the value in manually. The spin box supports double values but can be extended to use different strings with <a href="qdoublespinbox.html#validate">validate</a>(), <a href="qdoublespinbox.html#textFromValue">textFromValue</a>() and <a href="qdoublespinbox.html#valueFromText">valueFromText</a>().</p>
<p>Every time the value changes <a href="qdoublespinbox.html">QDoubleSpinBox</a> emits two <a href="qdoublespinbox.html#valueChanged">valueChanged</a>() signals, one taking providing a double and the other a <a href="../qtcore/qstring.html">QString</a>. The <a href="../qtcore/qstring.html">QString</a> overload provides the value with both <a href="qdoublespinbox.html#prefix-prop">prefix</a>() and <a href="qdoublespinbox.html#suffix-prop">suffix</a>(). The current value can be fetched with <a href="qdoublespinbox.html#value-prop">value</a>() and set with <a href="qdoublespinbox.html#value-prop">setValue</a>().</p>
<p>Note: <a href="qdoublespinbox.html">QDoubleSpinBox</a> will round numbers so they can be displayed with the current precision. In a <a href="qdoublespinbox.html">QDoubleSpinBox</a> with decimals set to 2, calling <a href="qdoublespinbox.html#value-prop">setValue</a>(2.555) will cause <a href="qdoublespinbox.html#value-prop">value</a>() to return 2.56.</p>
<p>Clicking the up and down buttons or using the keyboard accelerator's Up and Down arrows will increase or decrease the current value in steps of size <a href="qdoublespinbox.html#singleStep-prop">singleStep</a>(). If you want to change this behavior you can reimplement the virtual function <a href="qabstractspinbox.html#stepBy">stepBy</a>(). The minimum and maximum value and the step size can be set using one of the constructors, and can be changed later with <a href="qdoublespinbox.html#minimum-prop">setMinimum</a>(), <a href="qdoublespinbox.html#maximum-prop">setMaximum</a>() and <a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a>(). The spinbox has a default precision of 2 decimal places but this can be changed using <a href="qdoublespinbox.html#decimals-prop">setDecimals</a>().</p>
<p>Most spin boxes are directional, but <a href="qdoublespinbox.html">QDoubleSpinBox</a> can also operate as a circular spin box, i.e&#x2e; if the range is 0.0-99.9 and the current value is 99.9, clicking &quot;up&quot; will give 0 if <a href="qabstractspinbox.html#wrapping-prop">wrapping</a>() is set to true. Use <a href="qabstractspinbox.html#wrapping-prop">setWrapping</a>() if you want circular behavior.</p>
<p>The displayed value can be prepended and appended with arbitrary strings indicating, for example, currency or the unit of measurement. See <a href="qdoublespinbox.html#prefix-prop">setPrefix</a>() and <a href="qdoublespinbox.html#suffix-prop">setSuffix</a>(). The text in the spin box is retrieved with <a href="qabstractspinbox.html#text-prop">text</a>() (which includes any <a href="qdoublespinbox.html#prefix-prop">prefix</a>() and <a href="qdoublespinbox.html#suffix-prop">suffix</a>()), or with <a href="qdoublespinbox.html#cleanText-prop">cleanText</a>() (which has no <a href="qdoublespinbox.html#prefix-prop">prefix</a>(), no <a href="qdoublespinbox.html#suffix-prop">suffix</a>() and no leading or trailing whitespace).</p>
<p>It is often desirable to give the user a special (often default) choice in addition to the range of numeric values. See <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>() for how to do this with <a href="qdoublespinbox.html">QDoubleSpinBox</a>.</p>
<p><b>Note: </b>The displayed value of the <a href="qdoublespinbox.html">QDoubleSpinBox</a> is limited to 18 characters in addition to eventual prefix and suffix content. This limitation is used to keep the double spin box usable even with extremely large values.</p></div>
<p><b>See also </b><a href="qspinbox.html">QSpinBox</a>, <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qslider.html">QSlider</a>, and <a href="qtwidgets-widgets-spinboxes-example.html">Spin Boxes Example</a>.</p>
<!-- @@@QDoubleSpinBox -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$cleanText-prop$$$cleanText -->
<h3 class="fn" id="cleanText-prop"><a name="cleanText-prop"></a><span class="name">cleanText</span> : const <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>cleanText</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractspinbox.html#text-prop">text</a>, <a href="qdoublespinbox.html#prefix-prop">QDoubleSpinBox::prefix</a>, and <a href="qdoublespinbox.html#suffix-prop">QDoubleSpinBox::suffix</a>.</p>
<!-- @@@cleanText -->
<!-- $$$decimals-prop$$$decimals$$$setDecimalsint -->
<h3 class="fn" id="decimals-prop"><a name="decimals-prop"></a><span class="name">decimals</span> : <span class="type">int</span></h3>
<p>This property holds the precision of the spin box, in decimals</p>
<p>Sets how many decimals the spinbox will use for displaying and interpreting doubles.</p>
<p><b>Warning:</b> The maximum value for <i>decimals</i> is DBL_MAX_10_EXP + DBL_DIG (ie. 323) because of the limitations of the double type.</p>
<p>Note: The maximum, minimum and value might change as a result of changing this property.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>decimals</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDecimals</b></span>(int <i>prec</i>)</td></tr>
</table></div>
<!-- @@@decimals -->
<!-- $$$maximum-prop$$$maximum$$$setMaximumdouble -->
<h3 class="fn" id="maximum-prop"><a name="maximum-prop"></a><span class="name">maximum</span> : <span class="type">double</span></h3>
<p>This property holds the maximum value of the spin box</p>
<p>When setting this property the <a href="qdoublespinbox.html#minimum-prop">minimum</a> is adjusted if necessary, to ensure that the range remains valid.</p>
<p>The default maximum value is 99.99.</p>
<p>Note: The maximum value will be rounded to match the decimals property.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>maximum</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaximum</b></span>(double <i>max</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a> and <a href="qdoublespinbox.html#setRange">setRange</a>().</p>
<!-- @@@maximum -->
<!-- $$$minimum-prop$$$minimum$$$setMinimumdouble -->
<h3 class="fn" id="minimum-prop"><a name="minimum-prop"></a><span class="name">minimum</span> : <span class="type">double</span></h3>
<p>This property holds the minimum value of the spin box</p>
<p>When setting this property the <a href="qdoublespinbox.html#maximum-prop">maximum</a> is adjusted if necessary to ensure that the range remains valid.</p>
<p>The default minimum value is 0.0&#x2e;</p>
<p>Note: The minimum value will be rounded to match the decimals property.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>minimum</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinimum</b></span>(double <i>min</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a>, <a href="qdoublespinbox.html#setRange">setRange</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>.</p>
<!-- @@@minimum -->
<!-- $$$prefix-prop$$$prefix$$$setPrefixconstQString& -->
<h3 class="fn" id="prefix-prop"><a name="prefix-prop"></a><span class="name">prefix</span> : <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the spin box's prefix</p>
<p>The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:</p>
<pre class="cpp">

  spinbox<span class="operator">-</span><span class="operator">&gt;</span>setPrefix(<span class="string">&quot;$&quot;</span>);

</pre>
<p>To turn off the prefix display, set this property to an empty string. The default is no prefix. The prefix is not displayed when <a href="qdoublespinbox.html#value-prop">value</a>() == <a href="qdoublespinbox.html#minimum-prop">minimum</a>() and <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() is set.</p>
<p>If no prefix is set, prefix() returns an empty string.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>prefix</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPrefix</b></span>(const QString &amp;<i>prefix</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdoublespinbox.html#suffix-prop">suffix</a>(), <a href="qdoublespinbox.html#suffix-prop">setSuffix</a>(), <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>().</p>
<!-- @@@prefix -->
<!-- $$$singleStep-prop$$$singleStep$$$setSingleStepdouble -->
<h3 class="fn" id="singleStep-prop"><a name="singleStep-prop"></a><span class="name">singleStep</span> : <span class="type">double</span></h3>
<p>This property holds the step value</p>
<p>When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the singleStep. The default value is 1.0&#x2e; Setting a singleStep value of less than 0 does nothing.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>singleStep</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSingleStep</b></span>(double <i>val</i>)</td></tr>
</table></div>
<!-- @@@singleStep -->
<!-- $$$suffix-prop$$$suffix$$$setSuffixconstQString& -->
<h3 class="fn" id="suffix-prop"><a name="suffix-prop"></a><span class="name">suffix</span> : <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the suffix of the spin box</p>
<p>The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:</p>
<pre class="cpp">

  spinbox<span class="operator">-</span><span class="operator">&gt;</span>setSuffix(<span class="string">&quot; km&quot;</span>);

</pre>
<p>To turn off the suffix display, set this property to an empty string. The default is no suffix. The suffix is not displayed for the <a href="qdoublespinbox.html#minimum-prop">minimum</a>() if <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() is set.</p>
<p>If no suffix is set, suffix() returns an empty string.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>suffix</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSuffix</b></span>(const QString &amp;<i>suffix</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdoublespinbox.html#prefix-prop">prefix</a>(), <a href="qdoublespinbox.html#prefix-prop">setPrefix</a>(), <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>().</p>
<!-- @@@suffix -->
<!-- $$$value-prop$$$value$$$setValuedouble$$$valueChangeddouble$$$valueChangedconstQString& -->
<h3 class="fn" id="value-prop"><a name="value-prop"></a><span class="name">value</span> : <span class="type">double</span></h3>
<p>This property holds the value of the spin box</p>
<p>setValue() will emit <a href="qdoublespinbox.html#valueChanged">valueChanged</a>() if the new value is different from the old one. The value property has a second notifier signal which includes the spin box's prefix and suffix.</p>
<p>Note: The value will be rounded so it can be displayed with the current setting of decimals.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>value</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setValue</b></span>(double <i>val</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdoublespinbox.html#valueChanged">valueChanged</a></b></span>(double <i>d</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdoublespinbox.html#valueChanged-1">valueChanged</a></b></span>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a>.</p>
<!-- @@@value -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDoubleSpinBox[overload1]$$$QDoubleSpinBoxQWidget* -->
<h3 class="fn" id="QDoubleSpinBox"><a name="QDoubleSpinBox"></a>QDoubleSpinBox::<span class="name">QDoubleSpinBox</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value, a step value of 1.0 and a precision of 2 decimal places. The value is initially set to 0.00. The spin box has the given <i>parent</i>.</p>
<p><b>See also </b><a href="qdoublespinbox.html#minimum-prop">setMinimum</a>(), <a href="qdoublespinbox.html#maximum-prop">setMaximum</a>(), and <a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a>().</p>
<!-- @@@QDoubleSpinBox -->
<!-- $$$~QDoubleSpinBox[overload1]$$$~QDoubleSpinBox -->
<h3 class="fn" id="dtor.QDoubleSpinBox"><a name="dtor.QDoubleSpinBox"></a>QDoubleSpinBox::<span class="name">~QDoubleSpinBox</span>()</h3>
<p>Destructor.</p>
<!-- @@@~QDoubleSpinBox -->
<!-- $$$fixup[overload1]$$$fixupQString& -->
<h3 class="fn" id="fixup"><a name="fixup"></a><code>[override virtual] </code><span class="type">void</span> QDoubleSpinBox::<span class="name">fixup</span>(<span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>input</i>) const</h3>
<p>Reimplemented from <a href="qabstractspinbox.html#fixup">QAbstractSpinBox::fixup</a>().</p>
<!-- @@@fixup -->
<!-- $$$setRange[overload1]$$$setRangedoubledouble -->
<h3 class="fn" id="setRange"><a name="setRange"></a><span class="type">void</span> QDoubleSpinBox::<span class="name">setRange</span>(<span class="type">double</span> <i>minimum</i>, <span class="type">double</span> <i>maximum</i>)</h3>
<p>Convenience function to set the <i>minimum</i> and <i>maximum</i> values with a single function call.</p>
<p>Note: The maximum and minimum values will be rounded to match the decimals property.</p>
<pre class="cpp">

  setRange(minimum<span class="operator">,</span> maximum);

</pre>
<p>is equivalent to:</p>
<pre class="cpp">

  setMinimum(minimum);
  setMaximum(maximum);

</pre>
<p><b>See also </b><a href="qdoublespinbox.html#minimum-prop">minimum</a> and <a href="qdoublespinbox.html#maximum-prop">maximum</a>.</p>
<!-- @@@setRange -->
<!-- $$$textFromValue[overload1]$$$textFromValuedouble -->
<h3 class="fn" id="textFromValue"><a name="textFromValue"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QDoubleSpinBox::<span class="name">textFromValue</span>(<span class="type">double</span> <i>value</i>) const</h3>
<p>This virtual function is used by the spin box whenever it needs to display the given <i>value</i>. The default implementation returns a string containing <i>value</i> printed using <a href="qwidget.html#locale-prop">QWidget::locale</a>().toString(<i>value</i>, <a href="../qtcore/qlatin1char.html">QLatin1Char</a>('f'), <a href="qdoublespinbox.html#decimals-prop">decimals</a>()) and will remove the thousand separator unless <a href="qabstractspinbox.html#showGroupSeparator-prop">setGroupSeparatorShown</a>() is set. Reimplementations may return anything.</p>
<p>Note: <a href="qdoublespinbox.html">QDoubleSpinBox</a> does not call this function for <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() and that neither <a href="qdoublespinbox.html#prefix-prop">prefix</a>() nor <a href="qdoublespinbox.html#suffix-prop">suffix</a>() should be included in the return value.</p>
<p>If you reimplement this, you may also need to reimplement <a href="qdoublespinbox.html#valueFromText">valueFromText</a>().</p>
<p><b>See also </b><a href="qdoublespinbox.html#valueFromText">valueFromText</a>() and <a href="../qtcore/qlocale.html#groupSeparator">QLocale::groupSeparator</a>().</p>
<!-- @@@textFromValue -->
<!-- $$$validate[overload1]$$$validateQString&int& -->
<h3 class="fn" id="validate"><a name="validate"></a><code>[override virtual] </code><span class="type"><a href="../qtgui/qvalidator.html#State-enum">QValidator::State</a></span> QDoubleSpinBox::<span class="name">validate</span>(<span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, <span class="type">int</span> &amp;<i>pos</i>) const</h3>
<p>Reimplemented from <a href="qabstractspinbox.html#validate">QAbstractSpinBox::validate</a>().</p>
<!-- @@@validate -->
<!-- $$$valueChanged -->
<h3 class="fn" id="valueChanged"><a name="valueChanged"></a><code>[signal] </code><span class="type">void</span> QDoubleSpinBox::<span class="name">valueChanged</span>(<span class="type">double</span> <i>d</i>)</h3>
<p>This signal is emitted whenever the spin box's value is changed. The new value is passed in <i>d</i>.</p>
<p><b>Note:</b> Signal <i>valueChanged</i> is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:<pre class="cpp">

  connect(doubleSpinBox<span class="operator">,</span> <span class="keyword">static_cast</span><span class="operator">&lt;</span><span class="type">void</span>(<span class="type"><a href="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></span><span class="operator">::</span><span class="operator">*</span>)(<span class="type">double</span>)<span class="operator">&gt;</span>(<span class="operator">&amp;</span><span class="type"><a href="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></span><span class="operator">::</span>valueChanged)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type">double</span> d){ <span class="comment">/* ... */</span> });

</pre>
<p><b>Note:</b> Notifier signal for property <a href="qdoublespinbox.html#value-prop">value</a>. </p><!-- @@@valueChanged -->
<!-- $$$valueChanged -->
<h3 class="fn" id="valueChanged-1"><a name="valueChanged-1"></a><code>[signal] </code><span class="type">void</span> QDoubleSpinBox::<span class="name">valueChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This is an overloaded function.</p>
<p>The new value is passed in <i>text</i> with <a href="qdoublespinbox.html#prefix-prop">prefix</a>() and <a href="qdoublespinbox.html#suffix-prop">suffix</a>().</p>
<p><b>Note:</b> Signal <i>valueChanged</i> is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:<pre class="cpp">

  connect(doubleSpinBox<span class="operator">,</span> <span class="keyword">static_cast</span><span class="operator">&lt;</span><span class="type">void</span>(<span class="type"><a href="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></span><span class="operator">::</span><span class="operator">*</span>)(<span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span>)<span class="operator">&gt;</span>(<span class="operator">&amp;</span><span class="type"><a href="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></span><span class="operator">::</span>valueChanged)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span>text){ <span class="comment">/* ... */</span> });

</pre>
<p><b>Note:</b> Notifier signal for property <a href="qdoublespinbox.html#value-prop">value</a>. </p><!-- @@@valueChanged -->
<!-- $$$valueFromText[overload1]$$$valueFromTextconstQString& -->
<h3 class="fn" id="valueFromText"><a name="valueFromText"></a><code>[virtual] </code><span class="type">double</span> QDoubleSpinBox::<span class="name">valueFromText</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>) const</h3>
<p>This virtual function is used by the spin box whenever it needs to interpret <i>text</i> entered by the user as a value.</p>
<p>Subclasses that need to display spin box values in a non-numeric way need to reimplement this function.</p>
<p>Note: <a href="qdoublespinbox.html">QDoubleSpinBox</a> handles <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() separately; this function is only concerned with the other values.</p>
<p><b>See also </b><a href="qdoublespinbox.html#textFromValue">textFromValue</a>() and <a href="qdoublespinbox.html#validate">validate</a>().</p>
<!-- @@@valueFromText -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>