1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
<?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>QAbstractSpinBox 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">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractSpinBox Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QAbstractSpinBox class provides a spinbox and a line edit to
display values. <a href="#details">More...</a></p>
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><p>Inherited by <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qdoublespinbox.html">QDoubleSpinBox</a> and <a href="qspinbox.html">QSpinBox</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qabstractspinbox.html#ButtonSymbols-enum">ButtonSymbols</a></b> { UpDownArrows, PlusMinus, NoButtons }</li><li><div class="fn" />enum <b><a href="qabstractspinbox.html#CorrectionMode-enum">CorrectionMode</a></b> { CorrectToPreviousValue, CorrectToNearestValue }</li><li><div class="fn" />class <b><a href="qabstractspinbox-stepenabled.html">StepEnabled</a></b></li><li><div class="fn" />enum <b><a href="qabstractspinbox.html#StepEnabledFlag-enum">StepEnabledFlag</a></b> { StepNone, StepUpEnabled, StepDownEnabled }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractspinbox.html#QAbstractSpinBox">__init__</a></b> (<i>self</i>, QWidget <i>parent</i> = None)</li><li><div class="fn" />Qt.Alignment <b><a href="qabstractspinbox.html#alignment">alignment</a></b> (<i>self</i>)</li><li><div class="fn" />ButtonSymbols <b><a href="qabstractspinbox.html#buttonSymbols">buttonSymbols</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#closeEvent">closeEvent</a></b> (<i>self</i>, QCloseEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QContextMenuEvent <i>e</i>)</li><li><div class="fn" />CorrectionMode <b><a href="qabstractspinbox.html#correctionMode">correctionMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#event">event</a></b> (<i>self</i>, QEvent <i>event</i>)</li><li><div class="fn" />QString <i>input</i> <b><a href="qabstractspinbox.html#fixup">fixup</a></b> (<i>self</i>, QString <i>input</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#fixup-2">fixup</a></b> (<i>self</i>, QString <i>input</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent <i>e</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#hasAcceptableInput">hasAcceptableInput</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#hasFrame">hasFrame</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionSpinBox <i>option</i>)</li><li><div class="fn" />QVariant <b><a href="qabstractspinbox.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#interpretText">interpretText</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#isAccelerated">isAccelerated</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#isReadOnly">isReadOnly</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#keyboardTracking">keyboardTracking</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent <i>e</i>)</li><li><div class="fn" />QLineEdit <b><a href="qabstractspinbox.html#lineEdit">lineEdit</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qabstractspinbox.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QMouseEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QMouseEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#selectAll">selectAll</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setAccelerated">setAccelerated</a></b> (<i>self</i>, bool <i>on</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setAlignment">setAlignment</a></b> (<i>self</i>, Qt.Alignment <i>flag</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setButtonSymbols">setButtonSymbols</a></b> (<i>self</i>, ButtonSymbols <i>bs</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setCorrectionMode">setCorrectionMode</a></b> (<i>self</i>, CorrectionMode <i>cm</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setFrame">setFrame</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setKeyboardTracking">setKeyboardTracking</a></b> (<i>self</i>, bool <i>kt</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setLineEdit">setLineEdit</a></b> (<i>self</i>, QLineEdit <i>e</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setReadOnly">setReadOnly</a></b> (<i>self</i>, bool <i>r</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setSpecialValueText">setSpecialValueText</a></b> (<i>self</i>, QString <i>s</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#setWrapping">setWrapping</a></b> (<i>self</i>, bool <i>w</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent <i>e</i>)</li><li><div class="fn" />QSize <b><a href="qabstractspinbox.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractspinbox.html#specialValueText">specialValueText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#stepBy">stepBy</a></b> (<i>self</i>, int <i>steps</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#stepDown">stepDown</a></b> (<i>self</i>)</li><li><div class="fn" />StepEnabled <b><a href="qabstractspinbox.html#stepEnabled">stepEnabled</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#stepUp">stepUp</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractspinbox.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#timerEvent">timerEvent</a></b> (<i>self</i>, QTimerEvent <i>e</i>)</li><li><div class="fn" />(QValidator.State, QString <i>input</i>, int <i>pos</i>) <b><a href="qabstractspinbox.html#validate">validate</a></b> (<i>self</i>, QString <i>input</i>, int <i>pos</i>)</li><li><div class="fn" />(QValidator.State, int <i>pos</i>) <b><a href="qabstractspinbox.html#validate-2">validate</a></b> (<i>self</i>, QString <i>input</i>, int <i>pos</i>)</li><li><div class="fn" /><b><a href="qabstractspinbox.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QWheelEvent <i>e</i>)</li><li><div class="fn" />bool <b><a href="qabstractspinbox.html#wrapping">wrapping</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qabstractspinbox.html#editingFinished">editingFinished</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractSpinBox class provides a spinbox and a line edit to
display values.</p>
<p>The class is designed as a common super class for widgets like
<a href="qspinbox.html">QSpinBox</a>, <a href="qdoublespinbox.html">QDoubleSpinBox</a> and <a href="qdatetimeedit.html">QDateTimeEdit</a></p>
<p>Here are the main properties of the class:</p>
<ol class="1">
<li><a href="qabstractspinbox.html#text-prop">text</a>: The text
that is displayed in the QAbstractSpinBox.</li>
<li><a href="qabstractspinbox.html#alignment-prop">alignment</a>:
The alignment of the text in the QAbstractSpinBox.</li>
<li><a href="qabstractspinbox.html#wrapping-prop">wrapping</a>:
Whether the QAbstractSpinBox wraps from the minimum value to the
maximum value and vica versa.</li>
</ol>
<p>QAbstractSpinBox provides a virtual <a href="qabstractspinbox.html#stepBy">stepBy</a>() function that is called
whenever the user triggers a step. This function takes an integer
value to signify how many steps were taken. E.g. Pressing <a href="qt.html#Key-enum">Qt.Key_Down</a> will trigger a call to
stepBy(-1).</p>
<p>QAbstractSpinBox also provide a virtual function <a href="qabstractspinbox.html#stepEnabled">stepEnabled</a>() to determine
whether stepping up/down is allowed at any point. This function
returns a bitset of <a href="qabstractspinbox.html#StepEnabledFlag-enum">StepEnabled</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ButtonSymbols-enum" />QAbstractSpinBox.ButtonSymbols</h3><p>This enum type describes the symbols that can be displayed on
the buttons in a spin box.</p>
<p><img alt="" src="images/qspinbox-updown.png" /> <img alt="" src="images/qspinbox-plusminus.png" /></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>QAbstractSpinBox.UpDownArrows</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Little arrows in the classic style.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractSpinBox.PlusMinus</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign"><b>+</b> and <b>-</b> symbols.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractSpinBox.NoButtons</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Don't display buttons.</td>
</tr>
</table>
<p><b>See also</b> <a href="qabstractspinbox.html#buttonSymbols-prop">QAbstractSpinBox.buttonSymbols</a>.</p>
<h3 class="fn"><a name="CorrectionMode-enum" />QAbstractSpinBox.CorrectionMode</h3><p>This enum type describes the mode the spinbox will use to
correct an <a href="qvalidator.html#State-enum">Intermediate</a>
value if editing finishes.</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>QAbstractSpinBox.CorrectToPreviousValue</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The spinbox will revert to the last valid
value.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractSpinBox.CorrectToNearestValue</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The spinbox will revert to the nearest valid
value.</td>
</tr>
</table>
<p><b>See also</b> <a href="qabstractspinbox.html#correctionMode-prop">correctionMode</a>.</p>
<h3 class="fn"><a name="StepEnabledFlag-enum" />QAbstractSpinBox.StepEnabledFlag</h3><table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractSpinBox.StepNone</tt></td>
<td class="topAlign"><tt>0x00</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractSpinBox.StepUpEnabled</tt></td>
<td class="topAlign"><tt>0x01</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractSpinBox.StepDownEnabled</tt></td>
<td class="topAlign"><tt>0x02</tt></td>
</tr>
</table>
<p>The StepEnabled type is a typedef for <a href="qflags.html">QFlags</a><StepEnabledFlag>. It stores an OR
combination of StepEnabledFlag values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractSpinBox" />QAbstractSpinBox.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an abstract spinbox with the given <i>parent</i> with
default <a href="qabstractspinbox.html#wrapping-prop">wrapping</a>,
and <a href="qabstractspinbox.html#alignment-prop">alignment</a>
properties.</p>
<h3 class="fn"><a name="alignment" /><a href="qt-alignment.html">Qt.Alignment</a> QAbstractSpinBox.alignment (<i>self</i>)</h3><h3 class="fn"><a name="buttonSymbols" /><a href="qabstractspinbox.html#ButtonSymbols-enum">ButtonSymbols</a> QAbstractSpinBox.buttonSymbols (<i>self</i>)</h3><h3 class="fn"><a name="changeEvent" />QAbstractSpinBox.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>
<h3 class="fn"><a name="clear" />QAbstractSpinBox.clear (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clear()</tt>.</p><p>Clears the lineedit of all text but prefix and suffix.</p>
<h3 class="fn"><a name="closeEvent" />QAbstractSpinBox.closeEvent (<i>self</i>, <a href="qcloseevent.html">QCloseEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget.closeEvent</a>().</p>
<h3 class="fn"><a name="contextMenuEvent" />QAbstractSpinBox.contextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget.contextMenuEvent</a>().</p>
<h3 class="fn"><a name="correctionMode" /><a href="qabstractspinbox.html#CorrectionMode-enum">CorrectionMode</a> QAbstractSpinBox.correctionMode (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QAbstractSpinBox.event (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<h3 class="fn"><a name="fixup" />QString <i>input</i> QAbstractSpinBox.fixup (<i>self</i>, QString <i>input</i>)</h3><p>This virtual function is called by the <a href="qabstractspinbox.html">QAbstractSpinBox</a> if the <i>input</i> is
not validated to <a href="qvalidator.html#State-enum">QValidator.Acceptable</a> when Return
is pressed or <a href="qabstractspinbox.html#interpretText">interpretText</a>() is
called. It will try to change the text so it is valid.
Reimplemented in the various subclasses.</p>
<h3 class="fn"><a name="fixup-2" />QAbstractSpinBox.fixup (<i>self</i>, QString <i>input</i>)</h3><h3 class="fn"><a name="focusInEvent" />QAbstractSpinBox.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget.focusInEvent</a>().</p>
<h3 class="fn"><a name="focusOutEvent" />QAbstractSpinBox.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget.focusOutEvent</a>().</p>
<h3 class="fn"><a name="hasAcceptableInput" />bool QAbstractSpinBox.hasAcceptableInput (<i>self</i>)</h3><h3 class="fn"><a name="hasFrame" />bool QAbstractSpinBox.hasFrame (<i>self</i>)</h3><h3 class="fn"><a name="hideEvent" />QAbstractSpinBox.hideEvent (<i>self</i>, <a href="qhideevent.html">QHideEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#hideEvent">QWidget.hideEvent</a>().</p>
<h3 class="fn"><a name="initStyleOption" />QAbstractSpinBox.initStyleOption (<i>self</i>, <a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a> <i>option</i>)</h3><p>Initialize <i>option</i> with the values from this <a href="qspinbox.html">QSpinBox</a>. This method is useful for subclasses
when they need a <a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a>, but don't want
to fill in all the information themselves.</p>
<p><b>See also</b> <a href="qstyleoption.html#initFrom">QStyleOption.initFrom</a>().</p>
<h3 class="fn"><a name="inputMethodQuery" />QVariant QAbstractSpinBox.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a>)</h3><p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget.inputMethodQuery</a>().</p>
<h3 class="fn"><a name="interpretText" />QAbstractSpinBox.interpretText (<i>self</i>)</h3><p>This function interprets the text of the spin box. If the value
has changed since last interpretation it will emit signals.</p>
<h3 class="fn"><a name="isAccelerated" />bool QAbstractSpinBox.isAccelerated (<i>self</i>)</h3><h3 class="fn"><a name="isReadOnly" />bool QAbstractSpinBox.isReadOnly (<i>self</i>)</h3><h3 class="fn"><a name="keyboardTracking" />bool QAbstractSpinBox.keyboardTracking (<i>self</i>)</h3><h3 class="fn"><a name="keyPressEvent" />QAbstractSpinBox.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>
<p>This function handles keyboard input.</p>
<p>The following keys are handled specifically:</p>
<table class="generic">
<tr class="odd" valign="top">
<td>Enter/Return</td>
<td>This will reinterpret the text and emit a signal even if the
value has not changed since last time a signal was emitted.</td>
</tr>
<tr class="even" valign="top">
<td>Up</td>
<td>This will invoke stepBy(1)</td>
</tr>
<tr class="odd" valign="top">
<td>Down</td>
<td>This will invoke stepBy(-1)</td>
</tr>
<tr class="even" valign="top">
<td>Page up</td>
<td>This will invoke stepBy(10)</td>
</tr>
<tr class="odd" valign="top">
<td>Page down</td>
<td>This will invoke stepBy(-10)</td>
</tr>
</table>
<h3 class="fn"><a name="keyReleaseEvent" />QAbstractSpinBox.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget.keyReleaseEvent</a>().</p>
<h3 class="fn"><a name="lineEdit" /><a href="qlineedit.html">QLineEdit</a> QAbstractSpinBox.lineEdit (<i>self</i>)</h3><p>This function returns a pointer to the line edit of the spin
box.</p>
<p><b>See also</b> <a href="qabstractspinbox.html#setLineEdit">setLineEdit</a>().</p>
<h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QAbstractSpinBox.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p>
<h3 class="fn"><a name="mouseMoveEvent" />QAbstractSpinBox.mouseMoveEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget.mouseMoveEvent</a>().</p>
<h3 class="fn"><a name="mousePressEvent" />QAbstractSpinBox.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>
<h3 class="fn"><a name="mouseReleaseEvent" />QAbstractSpinBox.mouseReleaseEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget.mouseReleaseEvent</a>().</p>
<h3 class="fn"><a name="paintEvent" />QAbstractSpinBox.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>
<h3 class="fn"><a name="resizeEvent" />QAbstractSpinBox.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>
<h3 class="fn"><a name="selectAll" />QAbstractSpinBox.selectAll (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void selectAll()</tt>.</p><p>Selects all the text in the spinbox except the prefix and
suffix.</p>
<h3 class="fn"><a name="setAccelerated" />QAbstractSpinBox.setAccelerated (<i>self</i>, bool <i>on</i>)</h3><h3 class="fn"><a name="setAlignment" />QAbstractSpinBox.setAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>flag</i>)</h3><h3 class="fn"><a name="setButtonSymbols" />QAbstractSpinBox.setButtonSymbols (<i>self</i>, <a href="qabstractspinbox.html#ButtonSymbols-enum">ButtonSymbols</a> <i>bs</i>)</h3><h3 class="fn"><a name="setCorrectionMode" />QAbstractSpinBox.setCorrectionMode (<i>self</i>, <a href="qabstractspinbox.html#CorrectionMode-enum">CorrectionMode</a> <i>cm</i>)</h3><h3 class="fn"><a name="setFrame" />QAbstractSpinBox.setFrame (<i>self</i>, bool)</h3><h3 class="fn"><a name="setKeyboardTracking" />QAbstractSpinBox.setKeyboardTracking (<i>self</i>, bool <i>kt</i>)</h3><h3 class="fn"><a name="setLineEdit" />QAbstractSpinBox.setLineEdit (<i>self</i>, <a href="qlineedit.html">QLineEdit</a> <i>e</i>)</h3><p>The <i>e</i> argument has it's ownership transferred to Qt.</p><p>Sets the line edit of the spinbox to be <i>lineEdit</i> instead
of the current line edit widget. <i>lineEdit</i> can not be 0.</p>
<p><a href="qabstractspinbox.html">QAbstractSpinBox</a> takes
ownership of the new lineEdit</p>
<p>If <a href="qlineedit.html#validator">QLineEdit.validator</a>()
for the <i>lineEdit</i> returns 0, the internal validator of the
spinbox will be set on the line edit.</p>
<p><b>See also</b> <a href="qabstractspinbox.html#lineEdit">lineEdit</a>().</p>
<h3 class="fn"><a name="setReadOnly" />QAbstractSpinBox.setReadOnly (<i>self</i>, bool <i>r</i>)</h3><h3 class="fn"><a name="setSpecialValueText" />QAbstractSpinBox.setSpecialValueText (<i>self</i>, QString <i>s</i>)</h3><h3 class="fn"><a name="setWrapping" />QAbstractSpinBox.setWrapping (<i>self</i>, bool <i>w</i>)</h3><h3 class="fn"><a name="showEvent" />QAbstractSpinBox.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p>
<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QAbstractSpinBox.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>
<h3 class="fn"><a name="specialValueText" />QString QAbstractSpinBox.specialValueText (<i>self</i>)</h3><h3 class="fn"><a name="stepBy" />QAbstractSpinBox.stepBy (<i>self</i>, int <i>steps</i>)</h3><p>Virtual function that is called whenever the user triggers a
step. The <i>steps</i> parameter indicates how many steps were
taken, e.g. Pressing <a href="qt.html#Key-enum">Qt.Key_Down</a>
will trigger a call to stepBy(-1), whereas pressing <a href="qt.html#Key-enum">Qt.Key_Prior</a> will trigger a call to
stepBy(10).</p>
<p>If you subclass <a href="qabstractspinbox.html">QAbstractSpinBox</a> you must reimplement
this function. Note that this function is called even if the
resulting value will be outside the bounds of minimum and maximum.
It's this function's job to handle these situations.</p>
<h3 class="fn"><a name="stepDown" />QAbstractSpinBox.stepDown (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stepDown()</tt>.</p><p>Steps down by one linestep Calling this slot is analogous to
calling stepBy(-1);</p>
<p><b>See also</b> <a href="qabstractspinbox.html#stepBy">stepBy</a>() and <a href="qabstractspinbox.html#stepUp">stepUp</a>().</p>
<h3 class="fn"><a name="stepEnabled" /><a href="qabstractspinbox-stepenabled.html">StepEnabled</a> QAbstractSpinBox.stepEnabled (<i>self</i>)</h3><p>Virtual function that determines whether stepping up and down is
legal at any given time.</p>
<p>The up arrow will be painted as disabled unless (stepEnabled()
& <a href="qabstractspinbox.html#StepEnabledFlag-enum">StepUpEnabled</a>) !=
0.</p>
<p>The default implementation will return (<a href="qabstractspinbox.html#StepEnabledFlag-enum">StepUpEnabled</a>|
<a href="qabstractspinbox.html#StepEnabledFlag-enum">StepDownEnabled</a>)
if wrapping is turned on. Else it will return <a href="qabstractspinbox.html#StepEnabledFlag-enum">StepDownEnabled</a> if
value is > minimum() or'ed with <a href="qabstractspinbox.html#StepEnabledFlag-enum">StepUpEnabled</a> if
value < maximum().</p>
<p>If you subclass <a href="qabstractspinbox.html">QAbstractSpinBox</a> you will need to
reimplement this function.</p>
<p><b>See also</b> <a href="qspinbox.html#minimum-prop">QSpinBox.minimum</a>(), <a href="qspinbox.html#maximum-prop">QSpinBox.maximum</a>(), and <a href="qabstractspinbox.html#wrapping-prop">wrapping</a>().</p>
<h3 class="fn"><a name="stepUp" />QAbstractSpinBox.stepUp (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stepUp()</tt>.</p><p>Steps up by one linestep Calling this slot is analogous to
calling stepBy(1);</p>
<p><b>See also</b> <a href="qabstractspinbox.html#stepBy">stepBy</a>() and <a href="qabstractspinbox.html#stepDown">stepDown</a>().</p>
<h3 class="fn"><a name="text" />QString QAbstractSpinBox.text (<i>self</i>)</h3><h3 class="fn"><a name="timerEvent" />QAbstractSpinBox.timerEvent (<i>self</i>, <a href="qtimerevent.html">QTimerEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#timerEvent">QObject.timerEvent</a>().</p>
<h3 class="fn"><a name="validate" />(<a href="qvalidator.html#State-enum">QValidator.State</a>, QString <i>input</i>, int <i>pos</i>) QAbstractSpinBox.validate (<i>self</i>, QString <i>input</i>, int <i>pos</i>)</h3><p>This virtual function is called by the <a href="qabstractspinbox.html">QAbstractSpinBox</a> to determine whether
<i>input</i> is valid. The <i>pos</i> parameter indicates the
position in the string. Reimplemented in the various
subclasses.</p>
<h3 class="fn"><a name="validate-2" />(<a href="qvalidator.html#State-enum">QValidator.State</a>, int <i>pos</i>) QAbstractSpinBox.validate (<i>self</i>, QString <i>input</i>, int <i>pos</i>)</h3><h3 class="fn"><a name="wheelEvent" />QAbstractSpinBox.wheelEvent (<i>self</i>, <a href="qwheelevent.html">QWheelEvent</a> <i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget.wheelEvent</a>().</p>
<h3 class="fn"><a name="wrapping" />bool QAbstractSpinBox.wrapping (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="editingFinished" />void editingFinished ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted editing is finished. This happens when
the spinbox loses focus and when enter is pressed.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.9.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.2</td></tr></table></div></address></body></html>
|