Sophie

Sophie

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

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstractbutton.cpp -->
  <title>Qt 4.8: QAbstractButton Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QAbstractButton</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="#properties">Properties</a></li>
<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="#signals">Signals</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">QAbstractButton Class Reference</h1>
<!-- $$$QAbstractButton-brief -->
<p>The QAbstractButton class is the abstract base class of button widgets, providing functionality common to buttons. <a href="#details">More...</a></p>
<!-- @@@QAbstractButton -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAbstractButton&gt;</span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p>
<p><b>Inherited by: </b><a href="q3button.html" class="compat">Q3Button</a>, <a href="qcheckbox.html">QCheckBox</a>, <a href="qpushbutton.html">QPushButton</a>, <a href="qradiobutton.html">QRadioButton</a>, and <a href="qtoolbutton.html">QToolButton</a>.</p>
<ul>
<li><a href="qabstractbutton-members.html">List of all members, including inherited members</a></li>
<li><a href="qabstractbutton-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractbutton.html#autoExclusive-prop">autoExclusive</a></b> : bool</li>
<li class="fn"><b><a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a></b> : bool</li>
<li class="fn"><b><a href="qabstractbutton.html#autoRepeatDelay-prop">autoRepeatDelay</a></b> : int</li>
<li class="fn"><b><a href="qabstractbutton.html#autoRepeatInterval-prop">autoRepeatInterval</a></b> : int</li>
<li class="fn"><b><a href="qabstractbutton.html#checkable-prop">checkable</a></b> : bool</li>
<li class="fn"><b><a href="qabstractbutton.html#checked-prop">checked</a></b> : bool</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractbutton.html#down-prop">down</a></b> : bool</li>
<li class="fn"><b><a href="qabstractbutton.html#icon-prop">icon</a></b> : QIcon</li>
<li class="fn"><b><a href="qabstractbutton.html#iconSize-prop">iconSize</a></b> : QSize</li>
<li class="fn"><b><a href="qabstractbutton.html#shortcut-prop">shortcut</a></b> : QKeySequence</li>
<li class="fn"><b><a href="qabstractbutton.html#text-prop">text</a></b> : QString</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</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="qabstractbutton.html#QAbstractButton">QAbstractButton</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#dtor.QAbstractButton">~QAbstractButton</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoExclusive-prop">autoExclusive</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeatDelay-prop">autoRepeatDelay</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeatInterval-prop">autoRepeatInterval</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QButtonGroup * </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#group">group</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#icon-prop">icon</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#iconSize-prop">iconSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#checkable-prop">isCheckable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#checked-prop">isChecked</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#down-prop">isDown</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoExclusive-prop">setAutoExclusive</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeat-prop">setAutoRepeat</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeatDelay-prop">setAutoRepeatDelay</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#autoRepeatInterval-prop">setAutoRepeatInterval</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#checkable-prop">setCheckable</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#down-prop">setDown</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#icon-prop">setIcon</a></b> ( const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#shortcut-prop">setShortcut</a></b> ( const QKeySequence &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#text-prop">setText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#shortcut-prop">shortcut</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#text-prop">text</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#animateClick">animateClick</a></b> ( int <i>msec</i> = 100 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#click">click</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#checked-prop">setChecked</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#iconSize-prop">setIconSize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#toggle">toggle</a></b> ()</td></tr>
</table>
<ul>
<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="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#clicked">clicked</a></b> ( bool <i>checked</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#pressed">pressed</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#released">released</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#toggled">toggled</a></b> ( bool <i>checked</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">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="qabstractbutton.html#checkStateSet">checkStateSet</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#hitButton">hitButton</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#nextCheckState">nextCheckState</a></b> ()</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>e</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractbutton.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAbstractButton-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QAbstractButton class is the abstract base class of button widgets, providing functionality common to buttons.</p>
<p>This class implements an <i>abstract</i> button. Subclasses of this class handle user actions, and specify how the button is drawn.</p>
<p>QAbstractButton provides support for both push buttons and checkable (toggle) buttons. Checkable buttons are implemented in the <a href="qradiobutton.html">QRadioButton</a> and <a href="qcheckbox.html">QCheckBox</a> classes. Push buttons are implemented in the <a href="qpushbutton.html">QPushButton</a> and <a href="qtoolbutton.html">QToolButton</a> classes; these also provide toggle behavior if required.</p>
<p>Any button can display a label containing text and an icon. <a href="qabstractbutton.html#text-prop">setText</a>() sets the text; <a href="qabstractbutton.html#icon-prop">setIcon</a>() sets the icon. If a button is disabled, its label is changed to give the button a &quot;disabled&quot; appearance.</p>
<p>If the button is a text button with a string containing an ampersand ('&amp;'), QAbstractButton automatically creates a shortcut key. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpushbutton.html">QPushButton</a></span> <span class="operator">*</span>button <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>(tr(<span class="string">&quot;Ro&amp;ck &amp;&amp; Roll&quot;</span>)<span class="operator">,</span> <span class="keyword">this</span>);</pre>
<p>The <b>Alt+C</b> shortcut is assigned to the button, i.e&#x2e;, when the user presses <b>Alt+C</b> the button will call <a href="qabstractbutton.html#animateClick">animateClick</a>(). See the <a href="qshortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p>
<p>You can also set a custom shortcut key using the <a href="qabstractbutton.html#shortcut-prop">setShortcut</a>() function. This is useful mostly for buttons that do not have any text, because they have no automatic shortcut.</p>
<pre class="cpp"> button<span class="operator">-</span><span class="operator">&gt;</span><a href="qabstractbutton.html#icon-prop">setIcon</a>(<span class="type"><a href="qicon.html">QIcon</a></span>(<span class="string">&quot;:/images/print.png&quot;</span>));
 button<span class="operator">-</span><span class="operator">&gt;</span><a href="qabstractbutton.html#shortcut-prop">setShortcut</a>(tr(<span class="string">&quot;Alt+F7&quot;</span>));</pre>
<p>All of the buttons provided by Qt (<a href="qpushbutton.html">QPushButton</a>, <a href="qtoolbutton.html">QToolButton</a>, <a href="qcheckbox.html">QCheckBox</a>, and <a href="qradiobutton.html">QRadioButton</a>) can display both <a href="qabstractbutton.html#text-prop">text</a> and <a href="qabstractbutton.html#icon-prop">icons</a>.</p>
<p>A button can be made the default button in a dialog are provided by <a href="qpushbutton.html#default-prop">QPushButton::setDefault</a>() and <a href="qpushbutton.html#autoDefault-prop">QPushButton::setAutoDefault</a>().</p>
<p>QAbstractButton provides most of the states used for buttons:</p>
<ul>
<li><a href="qabstractbutton.html#down-prop">isDown</a>() indicates whether the button is <i>pressed</i> down.</li>
<li><a href="qabstractbutton.html#checked-prop">isChecked</a>() indicates whether the button is <i>checked</i>. Only checkable buttons can be checked and unchecked (see below).</li>
<li><a href="qwidget.html#enabled-prop">isEnabled</a>() indicates whether the button can be pressed by the user. <b>Note:</b> As opposed to other widgets, buttons derived from QAbstractButton accepts mouse and context menu events when disabled.</li>
<li><a href="qabstractbutton.html#autoRepeat-prop">setAutoRepeat</a>() sets whether the button will auto-repeat if the user holds it down. <a href="qabstractbutton.html#autoRepeatDelay-prop">autoRepeatDelay</a> and <a href="qabstractbutton.html#autoRepeatInterval-prop">autoRepeatInterval</a> define how auto-repetition is done.</li>
<li><a href="qabstractbutton.html#checkable-prop">setCheckable</a>() sets whether the button is a toggle button or not.</li>
</ul>
<p>The difference between <a href="qabstractbutton.html#down-prop">isDown</a>() and <a href="qabstractbutton.html#checked-prop">isChecked</a>() is as follows. When the user clicks a toggle button to check it, the button is first <i>pressed</i> then released into the <i>checked</i> state. When the user clicks it again (to uncheck it), the button moves first to the <i>pressed</i> state, then to the <i>unchecked</i> state (<a href="qabstractbutton.html#checked-prop">isChecked</a>() and <a href="qabstractbutton.html#down-prop">isDown</a>() are both false).</p>
<p>QAbstractButton provides four signals:</p>
<ol class="1">
<li><a href="qabstractbutton.html#pressed">pressed</a>() is emitted when the left mouse button is pressed while the mouse cursor is inside the button.</li>
<li><a href="qabstractbutton.html#released">released</a>() is emitted when the left mouse button is released.</li>
<li><a href="qabstractbutton.html#clicked">clicked</a>() is emitted when the button is first pressed and then released, when the shortcut key is typed, or when <a href="qabstractbutton.html#click">click</a>() or <a href="qabstractbutton.html#animateClick">animateClick</a>() is called.</li>
<li><a href="qabstractbutton.html#toggled">toggled</a>() is emitted when the state of a toggle button changes.</li>
</ol>
<p>To subclass QAbstractButton, you must reimplement at least <a href="qabstractbutton.html#paintEvent">paintEvent</a>() to draw the button's outline and its text or pixmap. It is generally advisable to reimplement <a href="qwidget.html#sizeHint-prop">sizeHint</a>() as well, and sometimes <a href="qabstractbutton.html#hitButton">hitButton</a>() (to determine whether a button press is within the button). For buttons with more than two states (like tri-state buttons), you will also have to reimplement <a href="qabstractbutton.html#checkStateSet">checkStateSet</a>() and <a href="qabstractbutton.html#nextCheckState">nextCheckState</a>().</p>
</div>
<p><b>See also </b><a href="qbuttongroup.html">QButtonGroup</a>.</p>
<!-- @@@QAbstractButton -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoExclusive-prop$$$autoExclusive$$$setAutoExclusivebool -->
<h3 class="fn"><a name="autoExclusive-prop"></a><span class="name">autoExclusive</span> : <span class="type">bool</span></h3>
<p>This property holds whether auto-exclusivity is enabled.</p>
<p>If auto-exclusivity is enabled, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. In an exclusive button group, only one button can be checked at any time; checking another button automatically unchecks the previously checked one.</p>
<p>The property has no effect on buttons that belong to a button group.</p>
<p>autoExclusive is off by default, except for radio buttons.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoExclusive</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoExclusive</b></span> ( bool )</td></tr>
</table>
<p><b>See also </b><a href="qradiobutton.html">QRadioButton</a>.</p>
<!-- @@@autoExclusive -->
<!-- $$$autoRepeat-prop$$$autoRepeat$$$setAutoRepeatbool -->
<h3 class="fn"><a name="autoRepeat-prop"></a><span class="name">autoRepeat</span> : <span class="type">bool</span></h3>
<p>This property holds whether autoRepeat is enabled.</p>
<p>If autoRepeat is enabled, then the <a href="qabstractbutton.html#pressed">pressed</a>(), <a href="qabstractbutton.html#released">released</a>(), and <a href="qabstractbutton.html#clicked">clicked</a>() signals are emitted at regular intervals when the button is down. autoRepeat is off by default. The initial delay and the repetition interval are defined in milliseconds by <a href="qabstractbutton.html#autoRepeatDelay-prop">autoRepeatDelay</a> and <a href="qabstractbutton.html#autoRepeatInterval-prop">autoRepeatInterval</a>.</p>
<p>Note: If a button is pressed down by a shortcut key, then auto-repeat is enabled and timed by the system and not by this class. The <a href="qabstractbutton.html#pressed">pressed</a>(), <a href="qabstractbutton.html#released">released</a>(), and <a href="qabstractbutton.html#clicked">clicked</a>() signals will be emitted like in the normal case.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoRepeat</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoRepeat</b></span> ( bool )</td></tr>
</table>
<!-- @@@autoRepeat -->
<!-- $$$autoRepeatDelay-prop$$$autoRepeatDelay$$$setAutoRepeatDelayint -->
<h3 class="fn"><a name="autoRepeatDelay-prop"></a><span class="name">autoRepeatDelay</span> : <span class="type">int</span></h3>
<p>This property holds the initial delay of auto-repetition.</p>
<p>If <a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a> is enabled, then autoRepeatDelay defines the initial delay in milliseconds before auto-repetition kicks in.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>autoRepeatDelay</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoRepeatDelay</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a> and <a href="qabstractbutton.html#autoRepeatInterval-prop">autoRepeatInterval</a>.</p>
<!-- @@@autoRepeatDelay -->
<!-- $$$autoRepeatInterval-prop$$$autoRepeatInterval$$$setAutoRepeatIntervalint -->
<h3 class="fn"><a name="autoRepeatInterval-prop"></a><span class="name">autoRepeatInterval</span> : <span class="type">int</span></h3>
<p>This property holds the interval of auto-repetition.</p>
<p>If <a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a> is enabled, then autoRepeatInterval defines the length of the auto-repetition interval in millisecons.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>autoRepeatInterval</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoRepeatInterval</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="qabstractbutton.html#autoRepeat-prop">autoRepeat</a> and <a href="qabstractbutton.html#autoRepeatDelay-prop">autoRepeatDelay</a>.</p>
<!-- @@@autoRepeatInterval -->
<!-- $$$checkable-prop$$$isCheckable$$$setCheckablebool -->
<h3 class="fn"><a name="checkable-prop"></a><span class="name">checkable</span> : <span class="type">bool</span></h3>
<p>This property holds whether the button is checkable.</p>
<p>By default, the button is not checkable.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isCheckable</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckable</b></span> ( bool )</td></tr>
</table>
<p><b>See also </b><a href="qabstractbutton.html#checked-prop">checked</a>.</p>
<!-- @@@checkable -->
<!-- $$$checked-prop$$$isChecked$$$setCheckedbool$$$toggledbool -->
<h3 class="fn"><a name="checked-prop"></a><span class="name">checked</span> : <span class="type">bool</span></h3>
<p>This property holds whether the button is checked.</p>
<p>Only checkable buttons can be checked. By default, the button is unchecked.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isChecked</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setChecked</b></span> ( bool )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qabstractbutton.html#toggled">toggled</a></b></span> ( bool <i>checked</i> )</td></tr>
</table>
<p><b>See also </b><a href="qabstractbutton.html#checkable-prop">checkable</a>.</p>
<!-- @@@checked -->
<!-- $$$down-prop$$$isDown$$$setDownbool -->
<h3 class="fn"><a name="down-prop"></a><span class="name">down</span> : <span class="type">bool</span></h3>
<p>This property holds whether the button is pressed down.</p>
<p>If this property is true, the button is pressed down. The signals <a href="qabstractbutton.html#pressed">pressed</a>() and <a href="qabstractbutton.html#clicked">clicked</a>() are not emitted if you set this property to true. The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isDown</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDown</b></span> ( bool )</td></tr>
</table>
<!-- @@@down -->
<!-- $$$icon-prop$$$icon$$$setIconconstQIcon& -->
<h3 class="fn"><a name="icon-prop"></a><span class="name">icon</span> : <span class="type"><a href="qicon.html">QIcon</a></span></h3>
<p>This property holds the icon shown on the button.</p>
<p>The icon's default size is defined by the GUI style, but can be adjusted by setting the <a href="qabstractbutton.html#iconSize-prop">iconSize</a> property.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QIcon </td><td class="memItemRight bottomAlign"><span class="name"><b>icon</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIcon</b></span> ( const QIcon &amp; <i>icon</i> )</td></tr>
</table>
<!-- @@@icon -->
<!-- $$$iconSize-prop$$$iconSize$$$setIconSizeconstQSize& -->
<h3 class="fn"><a name="iconSize-prop"></a><span class="name">iconSize</span> : <span class="type"><a href="qsize.html">QSize</a></span></h3>
<p>This property holds the icon size used for this button.</p>
<p>The default size is defined by the GUI style. This is a maximum size for the icons. Smaller icons will not be scaled up.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>iconSize</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconSize</b></span> ( const QSize &amp; <i>size</i> )</td></tr>
</table>
<!-- @@@iconSize -->
<!-- $$$shortcut-prop$$$shortcut$$$setShortcutconstQKeySequence& -->
<h3 class="fn"><a name="shortcut-prop"></a><span class="name">shortcut</span> : <span class="type"><a href="qkeysequence.html">QKeySequence</a></span></h3>
<p>This property holds the mnemonic associated with the button.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QKeySequence </td><td class="memItemRight bottomAlign"><span class="name"><b>shortcut</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setShortcut</b></span> ( const QKeySequence &amp; <i>key</i> )</td></tr>
</table>
<!-- @@@shortcut -->
<!-- $$$text-prop$$$text$$$setTextconstQString& -->
<h3 class="fn"><a name="text-prop"></a><span class="name">text</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text shown on the button.</p>
<p>If the button has no text, the text() function will return a an empty string.</p>
<p>If the text contains an ampersand character ('&amp;'), a shortcut is automatically created for it. The character that follows the '&amp;' will be used as the shortcut key. Any previous shortcut will be overwritten, or cleared if no shortcut is defined by the text. See the <a href="qshortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p>
<p>There is no default text.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>text</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setText</b></span> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<!-- @@@text -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAbstractButton[overload1]$$$QAbstractButtonQWidget* -->
<h3 class="fn"><a name="QAbstractButton"></a>QAbstractButton::<span class="name">QAbstractButton</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an abstract button with a <i>parent</i>.</p>
<!-- @@@QAbstractButton -->
<!-- $$$~QAbstractButton[overload1]$$$~QAbstractButton -->
<h3 class="fn"><a name="dtor.QAbstractButton"></a>QAbstractButton::<span class="name">~QAbstractButton</span> ()</h3>
<p>Destroys the button.</p>
<!-- @@@~QAbstractButton -->
<!-- $$$animateClick[overload1]$$$animateClickint -->
<h3 class="fn"><a name="animateClick"></a><span class="type">void</span> QAbstractButton::<span class="name">animateClick</span> ( <span class="type">int</span> <i>msec</i> = 100 )<tt> [slot]</tt></h3>
<p>Performs an animated click: the button is pressed immediately, and released <i>msec</i> milliseconds later (the default is 100 ms).</p>
<p>Calling this function again before the button was released will reset the release timer.</p>
<p>All signals associated with a click are emitted as appropriate.</p>
<p>This function does nothing if the button is <a href="qwidget.html#enabled-prop">disabled.</a></p>
<p><b>See also </b><a href="qabstractbutton.html#click">click</a>().</p>
<!-- @@@animateClick -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$checkStateSet[overload1]$$$checkStateSet -->
<h3 class="fn"><a name="checkStateSet"></a><span class="type">void</span> QAbstractButton::<span class="name">checkStateSet</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual handler is called when <a href="qabstractbutton.html#checked-prop">setChecked</a>() was called, unless it was called from within <a href="qabstractbutton.html#nextCheckState">nextCheckState</a>(). It allows subclasses to reset their intermediate button states.</p>
<p><b>See also </b><a href="qabstractbutton.html#nextCheckState">nextCheckState</a>().</p>
<!-- @@@checkStateSet -->
<!-- $$$click[overload1]$$$click -->
<h3 class="fn"><a name="click"></a><span class="type">void</span> QAbstractButton::<span class="name">click</span> ()<tt> [slot]</tt></h3>
<p>Performs a click.</p>
<p>All the usual signals associated with a click are emitted as appropriate. If the button is checkable, the state of the button is toggled.</p>
<p>This function does nothing if the button is <a href="qwidget.html#enabled-prop">disabled.</a></p>
<p><b>See also </b><a href="qabstractbutton.html#animateClick">animateClick</a>().</p>
<!-- @@@click -->
<!-- $$$clicked[overload1]$$$clickedbool -->
<h3 class="fn"><a name="clicked"></a><span class="type">void</span> QAbstractButton::<span class="name">clicked</span> ( <span class="type">bool</span> <i>checked</i> = false )<tt> [signal]</tt></h3>
<p>This signal is emitted when the button is activated (i.e&#x2e; pressed down then released while the mouse cursor is inside the button), when the shortcut key is typed, or when <a href="qabstractbutton.html#click">click</a>() or <a href="qabstractbutton.html#animateClick">animateClick</a>() is called. Notably, this signal is <i>not</i> emitted if you call <a href="qabstractbutton.html#down-prop">setDown</a>(), <a href="qabstractbutton.html#checked-prop">setChecked</a>() or <a href="qabstractbutton.html#toggle">toggle</a>().</p>
<p>If the button is checkable, <i>checked</i> is true if the button is checked, or false if the button is unchecked.</p>
<p><b>See also </b><a href="qabstractbutton.html#pressed">pressed</a>(), <a href="qabstractbutton.html#released">released</a>(), and <a href="qabstractbutton.html#toggled">toggled</a>().</p>
<!-- @@@clicked -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QAbstractButton::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn"><a name="focusInEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">focusInEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<!-- @@@focusInEvent -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn"><a name="focusOutEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">focusOutEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<!-- @@@focusOutEvent -->
<!-- $$$group[overload1]$$$group -->
<h3 class="fn"><a name="group"></a><span class="type"><a href="qbuttongroup.html">QButtonGroup</a></span> * QAbstractButton::<span class="name">group</span> () const</h3>
<p>Returns the group that this button belongs to.</p>
<p>If the button is not a member of any <a href="qbuttongroup.html">QButtonGroup</a>, this function returns 0.</p>
<p><b>See also </b><a href="qbuttongroup.html">QButtonGroup</a>.</p>
<!-- @@@group -->
<!-- $$$hitButton[overload1]$$$hitButtonconstQPoint& -->
<h3 class="fn"><a name="hitButton"></a><span class="type">bool</span> QAbstractButton::<span class="name">hitButton</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> ) const<tt> [virtual protected]</tt></h3>
<p>Returns true if <i>pos</i> is inside the clickable button rectangle; otherwise returns false.</p>
<p>By default, the clickable area is the entire widget. Subclasses may reimplement this function to provide support for clickable areas of different shapes and sizes.</p>
<!-- @@@hitButton -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$keyReleaseEvent[overload1]$$$keyReleaseEventQKeyEvent* -->
<h3 class="fn"><a name="keyReleaseEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">keyReleaseEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget::keyReleaseEvent</a>().</p>
<!-- @@@keyReleaseEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn"><a name="mouseMoveEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">mouseMoveEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">mousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn"><a name="mouseReleaseEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">mouseReleaseEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<!-- @@@mouseReleaseEvent -->
<!-- $$$nextCheckState[overload1]$$$nextCheckState -->
<h3 class="fn"><a name="nextCheckState"></a><span class="type">void</span> QAbstractButton::<span class="name">nextCheckState</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual handler is called when a button is clicked. The default implementation calls setChecked(!<a href="qabstractbutton.html#checked-prop">isChecked</a>()) if the button <a href="qabstractbutton.html#checkable-prop">isCheckable</a>(). It allows subclasses to implement intermediate button states.</p>
<p><b>See also </b><a href="qabstractbutton.html#checkStateSet">checkStateSet</a>().</p>
<!-- @@@nextCheckState -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>e</i> )<tt> [pure virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$pressed[overload1]$$$pressed -->
<h3 class="fn"><a name="pressed"></a><span class="type">void</span> QAbstractButton::<span class="name">pressed</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the button is pressed down.</p>
<p><b>See also </b><a href="qabstractbutton.html#released">released</a>() and <a href="qabstractbutton.html#clicked">clicked</a>().</p>
<!-- @@@pressed -->
<!-- $$$released[overload1]$$$released -->
<h3 class="fn"><a name="released"></a><span class="type">void</span> QAbstractButton::<span class="name">released</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the button is released.</p>
<p><b>See also </b><a href="qabstractbutton.html#pressed">pressed</a>(), <a href="qabstractbutton.html#clicked">clicked</a>(), and <a href="qabstractbutton.html#toggled">toggled</a>().</p>
<!-- @@@released -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn"><a name="timerEvent"></a><span class="type">void</span> QAbstractButton::<span class="name">timerEvent</span> ( <span class="type"><a href="qtimerevent.html">QTimerEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<!-- @@@timerEvent -->
<!-- $$$toggle[overload1]$$$toggle -->
<h3 class="fn"><a name="toggle"></a><span class="type">void</span> QAbstractButton::<span class="name">toggle</span> ()<tt> [slot]</tt></h3>
<p>Toggles the state of a checkable button.</p>
<p><b>See also </b><a href="qabstractbutton.html#checked-prop">checked</a>.</p>
<!-- @@@toggle -->
<!-- $$$toggled[overload1]$$$toggledbool -->
<h3 class="fn"><a name="toggled"></a><span class="type">void</span> QAbstractButton::<span class="name">toggled</span> ( <span class="type">bool</span> <i>checked</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever a checkable button changes its state. <i>checked</i> is true if the button is checked, or false if the button is unchecked.</p>
<p>This may be the result of a user action, <a href="qabstractbutton.html#click">click</a>() slot activation, or because <a href="qabstractbutton.html#checked-prop">setChecked</a>() was called.</p>
<p>The states of buttons in exclusive button groups are updated before this signal is emitted. This means that slots can act on either the &quot;off&quot; signal or the &quot;on&quot; signal emitted by the buttons in the group whose states have changed.</p>
<p>For example, a slot that reacts to signals emitted by newly checked buttons but which ignores signals from buttons that have been unchecked can be implemented using the following pattern:</p>
<pre class="cpp"> <span class="type">void</span> MyWidget<span class="operator">::</span>reactToToggle(<span class="type">bool</span> checked)
 {
    <span class="keyword">if</span> (checked) {
       <span class="comment">// Examine the new button states.</span>
       <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
    }
 }</pre>
<p>Button groups can be created using the <a href="qbuttongroup.html">QButtonGroup</a> class, and updates to the button states monitored with the <a href="qbuttongroup.html#buttonClicked">QButtonGroup::buttonClicked</a>() signal.</p>
<p><b>See also </b><a href="qabstractbutton.html#checked-prop">checked</a> and <a href="qabstractbutton.html#clicked">clicked</a>().</p>
<!-- @@@toggled -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>