Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6891

qt-doc-4.8.5-10.fc18.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" />
<!-- qtoolbutton.cpp -->
  <title>Qt 4.8: QToolButton 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>QToolButton</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<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">QToolButton Class Reference</h1>
<!-- $$$QToolButton-brief -->
<p>The QToolButton class provides a quick-access button to commands or options, usually used inside a <a href="qtoolbar.html">QToolBar</a>. <a href="#details">More...</a></p>
<!-- @@@QToolButton -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QToolButton&gt;</span></pre><p><b>Inherits: </b><a href="qabstractbutton.html">QAbstractButton</a>.</p>
<ul>
<li><a href="qtoolbutton-members.html">List of all members, including inherited members</a></li>
<li><a href="qtoolbutton-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#ToolButtonPopupMode-enum">ToolButtonPopupMode</a></b> { DelayedPopup, MenuButtonPopup, InstantPopup }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qtoolbutton.html#arrowType-prop">arrowType</a></b> : Qt::ArrowType</li>
<li class="fn"><b><a href="qtoolbutton.html#autoRaise-prop">autoRaise</a></b> : bool</li>
<li class="fn"><b><a href="qtoolbutton.html#popupMode-prop">popupMode</a></b> : ToolButtonPopupMode</li>
<li class="fn"><b><a href="qtoolbutton.html#toolButtonStyle-prop">toolButtonStyle</a></b> : Qt::ToolButtonStyle</li>
</ul>
<ul>
<li class="fn">11 properties inherited from <a href="qabstractbutton.html#properties">QAbstractButton</a></li>
<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="qtoolbutton.html#QToolButton">QToolButton</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#dtor.QToolButton">~QToolButton</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::ArrowType </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#arrowType-prop">arrowType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#autoRaise-prop">autoRaise</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#defaultAction">defaultAction</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#menu">menu</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ToolButtonPopupMode </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#popupMode-prop">popupMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#arrowType-prop">setArrowType</a></b> ( Qt::ArrowType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#autoRaise-prop">setAutoRaise</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#setMenu">setMenu</a></b> ( QMenu * <i>menu</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#popupMode-prop">setPopupMode</a></b> ( ToolButtonPopupMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::ToolButtonStyle </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#toolButtonStyle-prop">toolButtonStyle</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">21 public functions inherited from <a href="qabstractbutton.html#public-functions">QAbstractButton</a></li>
<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="qtoolbutton.html#setDefaultAction">setDefaultAction</a></b> ( QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#toolButtonStyle-prop">setToolButtonStyle</a></b> ( Qt::ToolButtonStyle <i>style</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#showMenu">showMenu</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">5 public slots inherited from <a href="qabstractbutton.html#public-slots">QAbstractButton</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="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="qtoolbutton.html#triggered">triggered</a></b> ( QAction * <i>action</i> )</td></tr>
</table>
<ul>
<li class="fn">4 signals inherited from <a href="qabstractbutton.html#signals">QAbstractButton</a></li>
<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"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionToolButton * <i>option</i> ) const</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="qtoolbutton.html#actionEvent">actionEvent</a></b> ( QActionEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#enterEvent">enterEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.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="qtoolbutton.html#leaveEvent">leaveEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.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="qtoolbutton.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="qtoolbutton.html#nextCheckState">nextCheckState</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbutton.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">14 protected functions inherited from <a href="qabstractbutton.html#protected-functions">QAbstractButton</a></li>
<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>
<!-- $$$QToolButton-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QToolButton class provides a quick-access button to commands or options, usually used inside a <a href="qtoolbar.html">QToolBar</a>.</p>
<p>A tool button is a special button that provides quick-access to specific commands or options. As opposed to a normal command button, a tool button usually doesn't show a text label, but shows an icon instead.</p>
<p>Tool buttons are normally created when new <a href="qaction.html">QAction</a> instances are created with <a href="qtoolbar.html#addAction">QToolBar::addAction</a>() or existing actions are added to a toolbar with <a href="qtoolbar.html#addAction">QToolBar::addAction</a>(). It is also possible to construct tool buttons in the same way as any other widget, and arrange them alongside other widgets in layouts.</p>
<p>One classic use of a tool button is to select tools; for example, the &quot;pen&quot; tool in a drawing program. This would be implemented by using a QToolButton as a toggle button (see <a href="qabstractbutton-qt3.html#setToggleButton" class="compat">setToggleButton</a>()).</p>
<p>QToolButton supports auto-raising. In auto-raise mode, the button draws a 3D frame only when the mouse points at it. The feature is automatically turned on when a button is used inside a <a href="qtoolbar.html">QToolBar</a>. Change it with <a href="qtoolbutton.html#autoRaise-prop">setAutoRaise</a>().</p>
<p>A tool button's icon is set as <a href="qicon.html">QIcon</a>. This makes it possible to specify different pixmaps for the disabled and active state. The disabled pixmap is used when the button's functionality is not available. The active pixmap is displayed when the button is auto-raised because the mouse pointer is hovering over it.</p>
<p>The button's look and dimension is adjustable with <a href="qtoolbutton.html#toolButtonStyle-prop">setToolButtonStyle</a>() and <a href="qabstractbutton.html#iconSize-prop">setIconSize</a>(). When used inside a <a href="qtoolbar.html">QToolBar</a> in a <a href="qmainwindow.html">QMainWindow</a>, the button automatically adjusts to <a href="qmainwindow.html">QMainWindow</a>'s settings (see <a href="qmainwindow.html#toolButtonStyle-prop">QMainWindow::setToolButtonStyle</a>() and <a href="qmainwindow.html#iconSize-prop">QMainWindow::setIconSize</a>()). Instead of an icon, a tool button can also display an arrow symbol, specified with <a href="qtoolbutton.html#arrowType-prop">arrowType</a>.</p>
<p>A tool button can offer additional choices in a popup menu. The popup menu can be set using <a href="qtoolbutton.html#setMenu">setMenu</a>(). Use <a href="qtoolbutton.html#popupMode-prop">setPopupMode</a>() to configure the different modes available for tool buttons with a menu set. The default mode is DelayedPopupMode which is sometimes used with the &quot;Back&quot; button in a web browser. After pressing and holding the button down for a while, a menu pops up showing a list of possible pages to jump to. The default delay is 600 ms; you can adjust it with <a href="qtoolbutton-qt3.html#setPopupDelay" class="compat">setPopupDelay</a>().</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/assistant-toolbar.png" alt="Qt Assistant's toolbar with tool buttons" /></td></tr>
<tr valign="top" class="even"><td >Qt Assistant's toolbar contains tool buttons that are associated with actions used in other parts of the main window.</td></tr>
</table>
</div>
<p><b>See also </b><a href="qpushbutton.html">QPushButton</a>, <a href="qtoolbar.html">QToolBar</a>, <a href="qmainwindow.html">QMainWindow</a>, <a href="qaction.html">QAction</a>, and <a href="guibooks.html#fowler">GUI Design Handbook: Push Button</a>.</p>
<!-- @@@QToolButton -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ToolButtonPopupMode$$$DelayedPopup$$$MenuButtonPopup$$$InstantPopup -->
<h3 class="fn"><a name="ToolButtonPopupMode-enum"></a>enum QToolButton::<span class="name">ToolButtonPopupMode</span></h3>
<p>Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QToolButton::DelayedPopup</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see <a href="qstyle.html#StyleHint-enum">QStyle::SH_ToolButton_PopupDelay</a>), the menu is displayed. A typical application example is the &quot;back&quot; button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list</td></tr>
<tr><td class="topAlign"><tt>QToolButton::MenuButtonPopup</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.</td></tr>
<tr><td class="topAlign"><tt>QToolButton::InstantPopup</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The menu is displayed, without delay, when the tool button is pressed. In this mode, the button's own action is not triggered.</td></tr>
</table>
<!-- @@@ToolButtonPopupMode -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$arrowType-prop$$$arrowType$$$setArrowTypeQt::ArrowType -->
<h3 class="fn"><a name="arrowType-prop"></a><span class="name">arrowType</span> : <span class="type"><a href="qt.html#ArrowType-enum">Qt::ArrowType</a></span></h3>
<p>This property holds whether the button displays an arrow instead of a normal icon.</p>
<p>This displays an arrow as the icon for the <a href="qtoolbutton.html">QToolButton</a>.</p>
<p>By default, this property is set to <a href="qt.html#ArrowType-enum">Qt::NoArrow</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::ArrowType </td><td class="memItemRight bottomAlign"><span class="name"><b>arrowType</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setArrowType</b></span> ( Qt::ArrowType <i>type</i> )</td></tr>
</table>
<!-- @@@arrowType -->
<!-- $$$autoRaise-prop$$$autoRaise$$$setAutoRaisebool -->
<h3 class="fn"><a name="autoRaise-prop"></a><span class="name">autoRaise</span> : <span class="type">bool</span></h3>
<p>This property holds whether auto-raising is enabled or not.</p>
<p>The default is disabled (i.e&#x2e; false).</p>
<p>This property is currently ignored on Mac OS X when using <a href="qmacstyle.html">QMacStyle</a>.</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>autoRaise</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoRaise</b></span> ( bool <i>enable</i> )</td></tr>
</table>
<!-- @@@autoRaise -->
<!-- $$$popupMode-prop$$$popupMode$$$setPopupModeToolButtonPopupMode -->
<h3 class="fn"><a name="popupMode-prop"></a><span class="name">popupMode</span> : <span class="type"><a href="qtoolbutton.html#ToolButtonPopupMode-enum">ToolButtonPopupMode</a></span></h3>
<p>This property describes the way that popup menus are used with tool buttons.</p>
<p>By default, this property is set to <a href="qtoolbutton.html#ToolButtonPopupMode-enum">DelayedPopup</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> ToolButtonPopupMode </td><td class="memItemRight bottomAlign"><span class="name"><b>popupMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPopupMode</b></span> ( ToolButtonPopupMode <i>mode</i> )</td></tr>
</table>
<!-- @@@popupMode -->
<!-- $$$toolButtonStyle-prop$$$toolButtonStyle$$$setToolButtonStyleQt::ToolButtonStyle -->
<h3 class="fn"><a name="toolButtonStyle-prop"></a><span class="name">toolButtonStyle</span> : <span class="type"><a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonStyle</a></span></h3>
<p>This property holds whether the tool button displays an icon only, text only, or text beside/below the icon.</p>
<p>The default is <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonIconOnly</a>.</p>
<p>To have the style of toolbuttons follow the system settings (as available in GNOME and KDE desktop environments), set this property to <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonFollowStyle</a>.</p>
<p><a href="qtoolbutton.html">QToolButton</a> automatically connects this slot to the relevant signal in the <a href="qmainwindow.html">QMainWindow</a> in which is resides.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::ToolButtonStyle </td><td class="memItemRight bottomAlign"><span class="name"><b>toolButtonStyle</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setToolButtonStyle</b></span> ( Qt::ToolButtonStyle <i>style</i> )</td></tr>
</table>
<!-- @@@toolButtonStyle -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QToolButton[overload1]$$$QToolButtonQWidget* -->
<h3 class="fn"><a name="QToolButton"></a>QToolButton::<span class="name">QToolButton</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an empty tool button with parent <i>parent</i>.</p>
<!-- @@@QToolButton -->
<!-- $$$~QToolButton[overload1]$$$~QToolButton -->
<h3 class="fn"><a name="dtor.QToolButton"></a>QToolButton::<span class="name">~QToolButton</span> ()</h3>
<p>Destroys the object and frees any allocated resources.</p>
<!-- @@@~QToolButton -->
<!-- $$$actionEvent[overload1]$$$actionEventQActionEvent* -->
<h3 class="fn"><a name="actionEvent"></a><span class="type">void</span> QToolButton::<span class="name">actionEvent</span> ( <span class="type"><a href="qactionevent.html">QActionEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#actionEvent">QWidget::actionEvent</a>().</p>
<!-- @@@actionEvent -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QToolButton::<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 -->
<!-- $$$defaultAction[overload1]$$$defaultAction -->
<h3 class="fn"><a name="defaultAction"></a><span class="type"><a href="qaction.html">QAction</a></span> * QToolButton::<span class="name">defaultAction</span> () const</h3>
<p>Returns the default action.</p>
<p><b>See also </b><a href="qtoolbutton.html#setDefaultAction">setDefaultAction</a>().</p>
<!-- @@@defaultAction -->
<!-- $$$enterEvent[overload1]$$$enterEventQEvent* -->
<h3 class="fn"><a name="enterEvent"></a><span class="type">void</span> QToolButton::<span class="name">enterEvent</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#enterEvent">QWidget::enterEvent</a>().</p>
<!-- @@@enterEvent -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QToolButton::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$hitButton[overload1]$$$hitButtonconstQPoint& -->
<h3 class="fn"><a name="hitButton"></a><span class="type">bool</span> QToolButton::<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>Reimplemented from <a href="qabstractbutton.html#hitButton">QAbstractButton::hitButton</a>().</p>
<!-- @@@hitButton -->
<!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionToolButton* -->
<h3 class="fn"><a name="initStyleOption"></a><span class="type">void</span> QToolButton::<span class="name">initStyleOption</span> ( <span class="type"><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></span> * <i>option</i> ) const<tt> [protected]</tt></h3>
<p>Initialize <i>option</i> with the values from this <a href="qtoolbutton.html">QToolButton</a>. This method is useful for subclasses when they need a <a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</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>
<!-- @@@initStyleOption -->
<!-- $$$leaveEvent[overload1]$$$leaveEventQEvent* -->
<h3 class="fn"><a name="leaveEvent"></a><span class="type">void</span> QToolButton::<span class="name">leaveEvent</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#leaveEvent">QWidget::leaveEvent</a>().</p>
<!-- @@@leaveEvent -->
<!-- $$$menu[overload1]$$$menu -->
<h3 class="fn"><a name="menu"></a><span class="type"><a href="qmenu.html">QMenu</a></span> * QToolButton::<span class="name">menu</span> () const</h3>
<p>Returns the associated menu, or 0 if no menu has been defined.</p>
<p><b>See also </b><a href="qtoolbutton.html#setMenu">setMenu</a>().</p>
<!-- @@@menu -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QToolButton::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<!-- @@@minimumSizeHint -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> QToolButton::<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> QToolButton::<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> QToolButton::<span class="name">nextCheckState</span> ()<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractbutton.html#nextCheckState">QAbstractButton::nextCheckState</a>().</p>
<!-- @@@nextCheckState -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QToolButton::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<p>Paints the button in response to the paint <i>event</i>.</p>
<!-- @@@paintEvent -->
<!-- $$$setDefaultAction[overload1]$$$setDefaultActionQAction* -->
<h3 class="fn"><a name="setDefaultAction"></a><span class="type">void</span> QToolButton::<span class="name">setDefaultAction</span> ( <span class="type"><a href="qaction.html">QAction</a></span> * <i>action</i> )<tt> [slot]</tt></h3>
<p>Sets the default action to <i>action</i>.</p>
<p>If a tool button has a default action, the action defines the button's properties like text, icon, tool tip, etc.</p>
<p><b>See also </b><a href="qtoolbutton.html#defaultAction">defaultAction</a>().</p>
<!-- @@@setDefaultAction -->
<!-- $$$setMenu[overload1]$$$setMenuQMenu* -->
<h3 class="fn"><a name="setMenu"></a><span class="type">void</span> QToolButton::<span class="name">setMenu</span> ( <span class="type"><a href="qmenu.html">QMenu</a></span> * <i>menu</i> )</h3>
<p>Associates the given <i>menu</i> with this tool button.</p>
<p>The menu will be shown according to the button's <a href="qtoolbutton.html#popupMode-prop">popupMode</a>.</p>
<p>Ownership of the menu is not transferred to the tool button.</p>
<p><b>See also </b><a href="qtoolbutton.html#menu">menu</a>().</p>
<!-- @@@setMenu -->
<!-- $$$showMenu[overload1]$$$showMenu -->
<h3 class="fn"><a name="showMenu"></a><span class="type">void</span> QToolButton::<span class="name">showMenu</span> ()<tt> [slot]</tt></h3>
<p>Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.</p>
<!-- @@@showMenu -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QToolButton::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn"><a name="timerEvent"></a><span class="type">void</span> QToolButton::<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 -->
<!-- $$$triggered[overload1]$$$triggeredQAction* -->
<h3 class="fn"><a name="triggered"></a><span class="type">void</span> QToolButton::<span class="name">triggered</span> ( <span class="type"><a href="qaction.html">QAction</a></span> * <i>action</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the given <i>action</i> is triggered.</p>
<p>The action may also be associated with other parts of the user interface, such as menu items and keyboard shortcuts. Sharing actions in this way helps make the user interface more consistent and is often less work to implement.</p>
<!-- @@@triggered -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

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