Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4855

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" />
<!-- qaction.cpp -->
  <title>Qt 4.8: QAction 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>QAction</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">QAction Class Reference</h1>
<!-- $$$QAction-brief -->
<p>The QAction class provides an abstract user interface action that can be inserted into widgets. <a href="#details">More...</a></p>
<!-- @@@QAction -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAction&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Inherited by: </b><a href="qmenuitem.html" class="compat">QMenuItem</a> and <a href="qwidgetaction.html">QWidgetAction</a>.</p>
<ul>
<li><a href="qaction-members.html">List of all members, including inherited members</a></li>
<li><a href="qaction-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="qaction.html#ActionEvent-enum">ActionEvent</a></b> { Trigger, Hover }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#MenuRole-enum">MenuRole</a></b> { NoRole, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole, ..., QuitRole }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#Priority-enum">Priority</a></b> { LowPriority, NormalPriority, HighPriority }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#SoftKeyRole-enum">SoftKeyRole</a></b> { NoSoftKey, PositiveSoftKey, NegativeSoftKey, SelectSoftKey }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qaction.html#autoRepeat-prop">autoRepeat</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#checkable-prop">checkable</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#checked-prop">checked</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#enabled-prop">enabled</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#font-prop">font</a></b> : QFont</li>
<li class="fn"><b><a href="qaction.html#icon-prop">icon</a></b> : QIcon</li>
<li class="fn"><b><a href="qaction.html#iconText-prop">iconText</a></b> : QString</li>
<li class="fn"><b><a href="qaction.html#iconVisibleInMenu-prop">iconVisibleInMenu</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#menuRole-prop">menuRole</a></b> : MenuRole</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qaction.html#priority-prop">priority</a></b> : Priority</li>
<li class="fn"><b><a href="qaction.html#shortcut-prop">shortcut</a></b> : QKeySequence</li>
<li class="fn"><b><a href="qaction.html#shortcutContext-prop">shortcutContext</a></b> : Qt::ShortcutContext</li>
<li class="fn"><b><a href="qaction.html#softKeyRole-prop">softKeyRole</a></b> : SoftKeyRole</li>
<li class="fn"><b><a href="qaction.html#statusTip-prop">statusTip</a></b> : QString</li>
<li class="fn"><b><a href="qaction.html#text-prop">text</a></b> : QString</li>
<li class="fn"><b><a href="qaction.html#toolTip-prop">toolTip</a></b> : QString</li>
<li class="fn"><b><a href="qaction.html#visible-prop">visible</a></b> : bool</li>
<li class="fn"><b><a href="qaction.html#whatsThis-prop">whatsThis</a></b> : QString</li>
</ul>
</td></tr>
</table>
<ul>
<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="qaction.html#QAction">QAction</a></b> ( QObject * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#QAction-2">QAction</a></b> ( const QString &amp; <i>text</i>, QObject * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#QAction-3">QAction</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i>, QObject * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#dtor.QAction">~QAction</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QActionGroup * </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#actionGroup">actionGroup</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#activate">activate</a></b> ( ActionEvent <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QGraphicsWidget *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#associatedGraphicsWidgets">associatedGraphicsWidgets</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QWidget *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#associatedWidgets">associatedWidgets</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#autoRepeat-prop">autoRepeat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#data">data</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#font-prop">font</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#icon-prop">icon</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#iconText-prop">iconText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#checkable-prop">isCheckable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#checked-prop">isChecked</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#enabled-prop">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#iconVisibleInMenu-prop">isIconVisibleInMenu</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#isSeparator">isSeparator</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#visible-prop">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#menu">menu</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> MenuRole </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#menuRole-prop">menuRole</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#parentWidget">parentWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Priority </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#priority-prop">priority</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setActionGroup">setActionGroup</a></b> ( QActionGroup * <i>group</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#autoRepeat-prop">setAutoRepeat</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#checkable-prop">setCheckable</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setData">setData</a></b> ( const QVariant &amp; <i>userData</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#font-prop">setFont</a></b> ( const QFont &amp; <i>font</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.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="qaction.html#iconText-prop">setIconText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#iconVisibleInMenu-prop">setIconVisibleInMenu</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.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="qaction.html#menuRole-prop">setMenuRole</a></b> ( MenuRole <i>menuRole</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#priority-prop">setPriority</a></b> ( Priority <i>priority</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setSeparator">setSeparator</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#shortcut-prop">setShortcut</a></b> ( const QKeySequence &amp; <i>shortcut</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#shortcutContext-prop">setShortcutContext</a></b> ( Qt::ShortcutContext <i>context</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setShortcuts">setShortcuts</a></b> ( const QList&lt;QKeySequence&gt; &amp; <i>shortcuts</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setShortcuts-2">setShortcuts</a></b> ( QKeySequence::StandardKey <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#softKeyRole-prop">setSoftKeyRole</a></b> ( SoftKeyRole <i>softKeyRole</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#statusTip-prop">setStatusTip</a></b> ( const QString &amp; <i>statusTip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#text-prop">setText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#toolTip-prop">setToolTip</a></b> ( const QString &amp; <i>tip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#whatsThis-prop">setWhatsThis</a></b> ( const QString &amp; <i>what</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#shortcut-prop">shortcut</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::ShortcutContext </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#shortcutContext-prop">shortcutContext</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QKeySequence&gt; </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#shortcuts">shortcuts</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#showStatusText">showStatusText</a></b> ( QWidget * <i>widget</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SoftKeyRole </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#softKeyRole-prop">softKeyRole</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#statusTip-prop">statusTip</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#text-prop">text</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#toolTip-prop">toolTip</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#whatsThis-prop">whatsThis</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#hover">hover</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#checked-prop">setChecked</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#setDisabled">setDisabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#enabled-prop">setEnabled</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#visible-prop">setVisible</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#toggle">toggle</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#trigger">trigger</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#changed">changed</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#hovered">hovered</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#toggled">toggled</a></b> ( bool <i>checked</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#triggered">triggered</a></b> ( bool <i>checked</i> = false )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qaction.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAction-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QAction class provides an abstract user interface action that can be inserted into widgets.</p>
<p>In applications many common commands can be invoked via menus, toolbar buttons, and keyboard shortcuts. Since the user expects each command to be performed in the same way, regardless of the user interface used, it is useful to represent each command as an <i>action</i>.</p>
<p>Actions can be added to menus and toolbars, and will automatically keep them in sync. For example, in a word processor, if the user presses a Bold toolbar button, the Bold menu item will automatically be checked.</p>
<p>Actions can be created as independent objects, but they may also be created during the construction of menus; the <a href="qmenu.html">QMenu</a> class contains convenience functions for creating actions suitable for use as menu items.</p>
<p>A QAction may contain an icon, menu text, a shortcut, status text, &quot;What's This?&quot; text, and a tooltip. Most of these can be set in the constructor. They can also be set independently with <a href="qaction.html#icon-prop">setIcon</a>(), <a href="qaction.html#text-prop">setText</a>(), <a href="qaction.html#iconText-prop">setIconText</a>(), <a href="qaction.html#shortcut-prop">setShortcut</a>(), <a href="qaction.html#statusTip-prop">setStatusTip</a>(), <a href="qaction.html#whatsThis-prop">setWhatsThis</a>(), and <a href="qaction.html#toolTip-prop">setToolTip</a>(). For menu items, it is possible to set an individual font with <a href="qaction.html#font-prop">setFont</a>().</p>
<p>Actions are added to widgets using <a href="qwidget.html#addAction">QWidget::addAction</a>() or <a href="qgraphicswidget.html#addAction">QGraphicsWidget::addAction</a>(). Note that an action must be added to a widget before it can be used; this is also true when the shortcut should be global (i.e&#x2e;, <a href="qt.html#ShortcutContext-enum">Qt::ApplicationShortcut</a> as <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a>).</p>
<p>Once a QAction has been created it should be added to the relevant menu and toolbar, then connected to the slot which will perform the action. For example:</p>
<pre class="cpp">     openAct <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QAction</span>(<span class="type"><a href="qicon.html">QIcon</a></span>(<span class="string">&quot;:/images/open.png&quot;</span>)<span class="operator">,</span> tr(<span class="string">&quot;&amp;Open...&quot;</span>)<span class="operator">,</span> <span class="keyword">this</span>);
     openAct<span class="operator">-</span><span class="operator">&gt;</span>setShortcuts(<span class="type"><a href="qkeysequence.html">QKeySequence</a></span><span class="operator">::</span>Open);
     openAct<span class="operator">-</span><span class="operator">&gt;</span>setStatusTip(tr(<span class="string">&quot;Open an existing file&quot;</span>));
     connect(openAct<span class="operator">,</span> SIGNAL(triggered())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(open()));

     fileMenu<span class="operator">-</span><span class="operator">&gt;</span>addAction(openAct);
     fileToolBar<span class="operator">-</span><span class="operator">&gt;</span>addAction(openAct);</pre>
<p>We recommend that actions are created as children of the window they are used in. In most cases actions will be children of the application's main window.</p>
</div>
<p><b>See also </b><a href="qmenu.html">QMenu</a>, <a href="qtoolbar.html">QToolBar</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
<!-- @@@QAction -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ActionEvent$$$Trigger$$$Hover -->
<h3 class="fn"><a name="ActionEvent-enum"></a>enum QAction::<span class="name">ActionEvent</span></h3>
<p>This enum type is used when calling <a href="qaction.html#activate">QAction::activate</a>()</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>QAction::Trigger</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">this will cause the <a href="qaction.html#triggered">QAction::triggered</a>() signal to be emitted.</td></tr>
<tr><td class="topAlign"><tt>QAction::Hover</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">this will cause the <a href="qaction.html#hovered">QAction::hovered</a>() signal to be emitted.</td></tr>
</table>
<!-- @@@ActionEvent -->
<!-- $$$MenuRole$$$NoRole$$$TextHeuristicRole$$$ApplicationSpecificRole$$$AboutQtRole$$$AboutRole$$$PreferencesRole$$$QuitRole -->
<h3 class="fn"><a name="MenuRole-enum"></a>enum QAction::<span class="name">MenuRole</span></h3>
<p>This enum describes how an action should be moved into the application menu on Mac OS X.</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>QAction::NoRole</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This action should not be put into the application menu</td></tr>
<tr><td class="topAlign"><tt>QAction::TextHeuristicRole</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">This action should be put in the application menu based on the action's text as described in the <a href="qmenubar.html">QMenuBar</a> documentation.</td></tr>
<tr><td class="topAlign"><tt>QAction::ApplicationSpecificRole</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">This action should be put in the application menu with an application specific role</td></tr>
<tr><td class="topAlign"><tt>QAction::AboutQtRole</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">This action matches handles the &quot;About Qt&quot; menu item.</td></tr>
<tr><td class="topAlign"><tt>QAction::AboutRole</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">This action should be placed where the &quot;About&quot; menu item is in the application menu. The text of the menu item will be set to &quot;About &lt;application name&gt;&quot;. The application name is fetched from the <tt>Info.plist</tt> file in the application's bundle (See <a href="deployment-mac.html">Deploying an Application on Mac OS X</a>).</td></tr>
<tr><td class="topAlign"><tt>QAction::PreferencesRole</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">This action should be placed where the &quot;Preferences..&#x2e;&quot; menu item is in the application menu.</td></tr>
<tr><td class="topAlign"><tt>QAction::QuitRole</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">This action should be placed where the Quit menu item is in the application menu.</td></tr>
</table>
<p>Setting this value only has effect on items that are in the immediate menus of the menubar, not the submenus of those menus. For example, if you have File menu in your menubar and the File menu has a submenu, setting the MenuRole for the actions in that submenu have no effect. They will never be moved.</p>
<!-- @@@MenuRole -->
<!-- $$$Priority$$$LowPriority$$$NormalPriority$$$HighPriority -->
<h3 class="fn"><a name="Priority-enum"></a>enum QAction::<span class="name">Priority</span></h3>
<p>This enum defines priorities for actions in user interface.</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>QAction::LowPriority</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The action should not be prioritized in the user interface.</td></tr>
<tr><td class="topAlign"><tt>QAction::NormalPriority</tt></td><td class="topAlign"><tt>128</tt></td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><tt>QAction::HighPriority</tt></td><td class="topAlign"><tt>256</tt></td><td class="topAlign">The action should be prioritized in the user interface.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.6.</p>
<p><b>See also </b><a href="qaction.html#priority-prop">priority</a>.</p>
<!-- @@@Priority -->
<!-- $$$SoftKeyRole$$$NoSoftKey$$$PositiveSoftKey$$$NegativeSoftKey$$$SelectSoftKey -->
<h3 class="fn"><a name="SoftKeyRole-enum"></a>enum QAction::<span class="name">SoftKeyRole</span></h3>
<p>This enum describes how an action should be placed in the softkey bar. Currently this enum only has an effect on the Symbian platform.</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>QAction::NoSoftKey</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This action should not be used as a softkey</td></tr>
<tr><td class="topAlign"><tt>QAction::PositiveSoftKey</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">This action is used to describe a softkey with a positive or non-destructive role such as Ok, Select, or Options.</td></tr>
<tr><td class="topAlign"><tt>QAction::NegativeSoftKey</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">This action is used to describe a soft ey with a negative or destructive role role such as Cancel, Discard, or Close.</td></tr>
<tr><td class="topAlign"><tt>QAction::SelectSoftKey</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">This action is used to describe a role that selects a particular item or widget in the application.</td></tr>
</table>
<p>Actions with a softkey role defined are only visible in the softkey bar when the widget containing the action has focus. If no widget currently has focus, the softkey framework will traverse up the widget parent hierarchy looking for a widget containing softkey actions.</p>
<p>This enum was introduced or modified in Qt 4.6.</p>
<!-- @@@SoftKeyRole -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoRepeat-prop$$$autoRepeat$$$setAutoRepeatbool$$$changed -->
<h3 class="fn"><a name="autoRepeat-prop"></a><span class="name">autoRepeat</span> : <span class="type">bool</span></h3>
<p>This property holds whether the action can auto repeat.</p>
<p>If true, the action will auto repeat when the keyboard shortcut combination is held down, provided that keyboard auto repeat is enabled on the system. The default value is true.</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"> 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>
<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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@autoRepeat -->
<!-- $$$checkable-prop$$$isCheckable$$$setCheckablebool$$$changed -->
<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 action is a checkable action.</p>
<p>A checkable action is one which has an on/off state. For example, in a word processor, a Bold toolbar button may be either on or off. An action which is not a toggle action is a command action; a command action is simply executed, e.g&#x2e; file save. By default, this property is false.</p>
<p>In some situations, the state of one toggle action should depend on the state of others. For example, &quot;Left Align&quot;, &quot;Center&quot; and &quot;Right Align&quot; toggle actions are mutually exclusive. To achieve exclusive toggling, add the relevant toggle actions to a <a href="qactiongroup.html">QActionGroup</a> with the <a href="qactiongroup.html#exclusive-prop">QActionGroup::exclusive</a> property set to true.</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>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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#checked-prop">QAction::setChecked</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 action is checked.</p>
<p>Only checkable actions can be checked. By default, this is false (the action 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="qaction.html#toggled">toggled</a></b></span> ( bool <i>checked</i> )</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#checkable-prop">checkable</a>.</p>
<!-- @@@checked -->
<!-- $$$enabled-prop$$$isEnabled$$$setEnabledbool$$$changed -->
<h3 class="fn"><a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether the action is enabled.</p>
<p>Disabled actions cannot be chosen by the user. They do not disappear from menus or toolbars, but they are displayed in a way which indicates that they are unavailable. For example, they might be displayed using only shades of gray.</p>
<p><b>What's This?</b> help on disabled actions is still available, provided that the <a href="qaction.html#whatsThis-prop">QAction::whatsThis</a> property is set.</p>
<p>An action will be disabled when all widgets to which it is added (with <a href="qwidget.html#addAction">QWidget::addAction</a>()) are disabled or not visible. When an action is disabled, it is not possible to trigger it through its shortcut.</p>
<p>By default, this property is true (actions are enabled).</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>isEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEnabled</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#text-prop">text</a>.</p>
<!-- @@@enabled -->
<!-- $$$font-prop$$$font$$$setFontconstQFont&$$$changed -->
<h3 class="fn"><a name="font-prop"></a><span class="name">font</span> : <span class="type"><a href="qfont.html">QFont</a></span></h3>
<p>This property holds the action's font.</p>
<p>The font property is used to render the text set on the <a href="qaction.html">QAction</a>. The font will can be considered a hint as it will not be consulted in all cases based upon application and style.</p>
<p>By default, this property contains the application's default font.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QFont </td><td class="memItemRight bottomAlign"><span class="name"><b>font</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFont</b></span> ( const QFont &amp; <i>font</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#text-prop">QAction::setText</a>() and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@font -->
<!-- $$$icon-prop$$$icon$$$setIconconstQIcon&$$$changed -->
<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 action's icon.</p>
<p>In toolbars, the icon is used as the tool button icon; in menus, it is displayed to the left of the menu text. There is no default icon.</p>
<p>On Symbian the icons which are passed to softkeys, i.e&#x2e; to actions with softkey role, need to have pixmap alpha channel correctly set otherwise drawing artifacts will appear when softkey is pressed down.</p>
<p>If a null icon (<a href="qicon.html#isNull">QIcon::isNull</a>() is passed into this function, the icon of the action is cleared.</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>
<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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@icon -->
<!-- $$$iconText-prop$$$iconText$$$setIconTextconstQString&$$$changed -->
<h3 class="fn"><a name="iconText-prop"></a><span class="name">iconText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the action's descriptive icon text.</p>
<p>If <a href="qtoolbar.html#toolButtonStyle-prop">QToolBar::toolButtonStyle</a> is set to a value that permits text to be displayed, the text defined held in this property appears as a label in the relevant tool button.</p>
<p>It also serves as the default text in menus and tooltips if the action has not been defined with <a href="qaction.html#text-prop">setText</a>() or <a href="qaction.html#toolTip-prop">setToolTip</a>(), and will also be used in toolbar buttons if no icon has been defined using <a href="qaction.html#icon-prop">setIcon</a>().</p>
<p>If the icon text is not explicitly set, the action's normal text will be used for the icon text.</p>
<p>By default, this property contains an empty string.</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>iconText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconText</b></span> ( const QString &amp; <i>text</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#toolTip-prop">setToolTip</a>() and <a href="qaction.html#statusTip-prop">setStatusTip</a>().</p>
<!-- @@@iconText -->
<!-- $$$iconVisibleInMenu-prop$$$isIconVisibleInMenu$$$setIconVisibleInMenubool$$$changed -->
<h3 class="fn"><a name="iconVisibleInMenu-prop"></a><span class="name">iconVisibleInMenu</span> : <span class="type">bool</span></h3>
<p>This property holds whether or not an action should show an icon in a menu.</p>
<p>In some applications, it may make sense to have actions with icons in the toolbar, but not in menus. If true, the icon (if valid) is shown in the menu, when it is false, it is not shown.</p>
<p>The default is to follow whether the <a href="qt.html#ApplicationAttribute-enum">Qt::AA_DontShowIconsInMenus</a> attribute is set for the application. Explicitly settings this property overrides the presence (or abscence) of the attribute.</p>
<p>For example:</p>
<pre class="cpp"> <span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
 app<span class="operator">.</span>setAttribute(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>AA_DontShowIconsInMenus);  <span class="comment">// Icons are *no longer shown* in menus</span>
 <span class="comment">// ...</span>
 <span class="type"><a href="qaction.html">QAction</a></span> <span class="operator">*</span>myAction <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qaction.html">QAction</a></span>();
 <span class="comment">// ...</span>
 myAction<span class="operator">-</span><span class="operator">&gt;</span><a href="qaction.html#icon-prop">setIcon</a>(SomeIcon);
 myAction<span class="operator">-</span><span class="operator">&gt;</span>setIconVisibleInMenu(<span class="keyword">true</span>);   <span class="comment">// Icon *will* be shown in menus for *this* action.</span></pre>
<p>This property was introduced in Qt 4.4.</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>isIconVisibleInMenu</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconVisibleInMenu</b></span> ( bool <i>visible</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#icon-prop">QAction::icon</a> and <a href="qcoreapplication.html#setAttribute">QApplication::setAttribute</a>().</p>
<!-- @@@iconVisibleInMenu -->
<!-- $$$menuRole-prop$$$menuRole$$$setMenuRoleMenuRole$$$changed -->
<h3 class="fn"><a name="menuRole-prop"></a><span class="name">menuRole</span> : <span class="type"><a href="qaction.html#MenuRole-enum">MenuRole</a></span></h3>
<p>This property holds the action's menu role.</p>
<p>This indicates what role the action serves in the application menu on Mac OS X. By default all action have the <a href="qaction.html#MenuRole-enum">TextHeuristicRole</a>, which means that the action is added based on its text (see <a href="qmenubar.html">QMenuBar</a> for more information).</p>
<p>The menu role can only be changed before the actions are put into the menu bar in Mac OS X (usually just before the first application window is shown).</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"> MenuRole </td><td class="memItemRight bottomAlign"><span class="name"><b>menuRole</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMenuRole</b></span> ( MenuRole <i>menuRole</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@menuRole -->
<!-- $$$priority-prop$$$priority$$$setPriorityPriority -->
<h3 class="fn"><a name="priority-prop"></a><span class="name">priority</span> : <span class="type"><a href="qaction.html#Priority-enum">Priority</a></span></h3>
<p>This property holds the actions's priority in the user interface.</p>
<p>This property can be set to indicate how the action should be prioritized in the user interface.</p>
<p>For instance, when toolbars have the <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonTextBesideIcon</a> mode set, then actions with <a href="qaction.html#Priority-enum">LowPriority</a> will not show the text labels.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Priority </td><td class="memItemRight bottomAlign"><span class="name"><b>priority</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPriority</b></span> ( Priority <i>priority</i> )</td></tr>
</table>
<!-- @@@priority -->
<!-- $$$shortcut-prop$$$shortcut$$$setShortcutconstQKeySequence&$$$changed -->
<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 action's primary shortcut key.</p>
<p>Valid keycodes for this property can be found in <a href="qt.html#Key-enum">Qt::Key</a> and <a href="qt.html#Modifier-enum">Qt::Modifier</a>. There is no default shortcut key.</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>shortcut</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@shortcut -->
<!-- $$$shortcutContext-prop$$$shortcutContext$$$setShortcutContextQt::ShortcutContext$$$changed -->
<h3 class="fn"><a name="shortcutContext-prop"></a><span class="name">shortcutContext</span> : <span class="type"><a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a></span></h3>
<p>This property holds the context for the action's shortcut.</p>
<p>Valid values for this property can be found in <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a>. The default value is <a href="qt.html#ShortcutContext-enum">Qt::WindowShortcut</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::ShortcutContext </td><td class="memItemRight bottomAlign"><span class="name"><b>shortcutContext</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setShortcutContext</b></span> ( Qt::ShortcutContext <i>context</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@shortcutContext -->
<!-- $$$softKeyRole-prop$$$softKeyRole$$$setSoftKeyRoleSoftKeyRole$$$changed -->
<h3 class="fn"><a name="softKeyRole-prop"></a><span class="name">softKeyRole</span> : <span class="type"><a href="qaction.html#SoftKeyRole-enum">SoftKeyRole</a></span></h3>
<p>This property holds the action's softkey role.</p>
<p>This indicates what type of role this action describes in the softkey framework on platforms where such a framework is supported. Currently this is only supported on the Symbian platform.</p>
<p>The softkey role can be changed any time.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> SoftKeyRole </td><td class="memItemRight bottomAlign"><span class="name"><b>softKeyRole</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSoftKeyRole</b></span> ( SoftKeyRole <i>softKeyRole</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@softKeyRole -->
<!-- $$$statusTip-prop$$$statusTip$$$setStatusTipconstQString&$$$changed -->
<h3 class="fn"><a name="statusTip-prop"></a><span class="name">statusTip</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the action's status tip.</p>
<p>The status tip is displayed on all status bars provided by the action's top-level parent widget.</p>
<p>By default, this property contains an empty string.</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>statusTip</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setStatusTip</b></span> ( const QString &amp; <i>statusTip</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#toolTip-prop">setToolTip</a>() and <a href="qaction.html#showStatusText">showStatusText</a>().</p>
<!-- @@@statusTip -->
<!-- $$$text-prop$$$text$$$setTextconstQString&$$$changed -->
<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 action's descriptive text.</p>
<p>If the action is added to a menu, the menu option will consist of the icon (if there is one), the text, and the shortcut (if there is one). If the text is not explicitly set in the constructor, or by using setText(), the action's description icon text will be used as text. 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>
<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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#iconText-prop">iconText</a>.</p>
<!-- @@@text -->
<!-- $$$toolTip-prop$$$toolTip$$$setToolTipconstQString&$$$changed -->
<h3 class="fn"><a name="toolTip-prop"></a><span class="name">toolTip</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the action's tooltip.</p>
<p>This text is used for the tooltip. If no tooltip is specified, the action's text is used.</p>
<p>By default, this property contains the action's 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>toolTip</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setToolTip</b></span> ( const QString &amp; <i>tip</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qaction.html#statusTip-prop">setStatusTip</a>() and <a href="qaction.html#shortcut-prop">setShortcut</a>().</p>
<!-- @@@toolTip -->
<!-- $$$visible-prop$$$isVisible$$$setVisiblebool$$$changed -->
<h3 class="fn"><a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></h3>
<p>This property holds whether the action can be seen (e.g. in menus and toolbars).</p>
<p>If <i>visible</i> is true the action can be seen (e.g&#x2e; in menus and toolbars) and chosen by the user; if <i>visible</i> is false the action cannot be seen or chosen by the user.</p>
<p>Actions which are not visible are <i>not</i> grayed out; they do not appear at all.</p>
<p>By default, this property is true (actions are visible).</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>isVisible</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVisible</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<!-- @@@visible -->
<!-- $$$whatsThis-prop$$$whatsThis$$$setWhatsThisconstQString&$$$changed -->
<h3 class="fn"><a name="whatsThis-prop"></a><span class="name">whatsThis</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the action's "What's This?" help text.</p>
<p>The &quot;What's This?&quot; text is used to provide a brief description of the action. The text may contain rich text. There is no default &quot;What's This?&quot; 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>whatsThis</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWhatsThis</b></span> ( const QString &amp; <i>what</i> )</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="qaction.html#changed">changed</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qwhatsthis.html">QWhatsThis</a> and <a href="q3stylesheet.html" class="compat">Q3StyleSheet</a>.</p>
<!-- @@@whatsThis -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAction[overload1]$$$QActionQObject* -->
<h3 class="fn"><a name="QAction"></a>QAction::<span class="name">QAction</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> )</h3>
<p>Constructs an action with <i>parent</i>. If <i>parent</i> is an action group the action will be automatically inserted into the group.</p>
<!-- @@@QAction -->
<!-- $$$QAction$$$QActionconstQString&QObject* -->
<h3 class="fn"><a name="QAction-2"></a>QAction::<span class="name">QAction</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> )</h3>
<p>Constructs an action with some <i>text</i> and <i>parent</i>. If <i>parent</i> is an action group the action will be automatically inserted into the group.</p>
<p>The action uses a stripped version of <i>text</i> (e.g&#x2e; &quot;&amp;Menu Option..&#x2e;&quot; becomes &quot;Menu Option&quot;) as descriptive text for tool buttons. You can override this by setting a specific description with <a href="qaction.html#text-prop">setText</a>(). The same text will be used for tooltips unless you specify a different text using <a href="qaction.html#toolTip-prop">setToolTip</a>().</p>
<!-- @@@QAction -->
<!-- $$$QAction$$$QActionconstQIcon&constQString&QObject* -->
<h3 class="fn"><a name="QAction-3"></a>QAction::<span class="name">QAction</span> ( const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> )</h3>
<p>Constructs an action with an <i>icon</i> and some <i>text</i> and <i>parent</i>. If <i>parent</i> is an action group the action will be automatically inserted into the group.</p>
<p>The action uses a stripped version of <i>text</i> (e.g&#x2e; &quot;&amp;Menu Option..&#x2e;&quot; becomes &quot;Menu Option&quot;) as descriptive text for tool buttons. You can override this by setting a specific description with <a href="qaction.html#text-prop">setText</a>(). The same text will be used for tooltips unless you specify a different text using <a href="qaction.html#toolTip-prop">setToolTip</a>().</p>
<!-- @@@QAction -->
<!-- $$$~QAction[overload1]$$$~QAction -->
<h3 class="fn"><a name="dtor.QAction"></a>QAction::<span class="name">~QAction</span> ()</h3>
<p>Destroys the object and frees allocated resources.</p>
<!-- @@@~QAction -->
<!-- $$$actionGroup[overload1]$$$actionGroup -->
<h3 class="fn"><a name="actionGroup"></a><span class="type"><a href="qactiongroup.html">QActionGroup</a></span> * QAction::<span class="name">actionGroup</span> () const</h3>
<p>Returns the action group for this action. If no action group manages this action then 0 will be returned.</p>
<p><b>See also </b><a href="qactiongroup.html">QActionGroup</a> and <a href="qaction.html#setActionGroup">QAction::setActionGroup</a>().</p>
<!-- @@@actionGroup -->
<!-- $$$activate[overload1]$$$activateActionEvent -->
<h3 class="fn"><a name="activate"></a><span class="type">void</span> QAction::<span class="name">activate</span> ( <span class="type"><a href="qaction.html#ActionEvent-enum">ActionEvent</a></span> <i>event</i> )</h3>
<p>Sends the relevant signals for <a href="qaction.html#ActionEvent-enum">ActionEvent</a> <i>event</i>.</p>
<p>Action based widgets use this API to cause the <a href="qaction.html">QAction</a> to emit signals as well as emitting their own.</p>
<!-- @@@activate -->
<!-- $$$associatedGraphicsWidgets[overload1]$$$associatedGraphicsWidgets -->
<h3 class="fn"><a name="associatedGraphicsWidgets"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> *&gt; QAction::<span class="name">associatedGraphicsWidgets</span> () const</h3>
<p>Returns a list of widgets this action has been added to.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qwidget.html#addAction">QWidget::addAction</a>() and <a href="qaction.html#associatedWidgets">associatedWidgets</a>().</p>
<!-- @@@associatedGraphicsWidgets -->
<!-- $$$associatedWidgets[overload1]$$$associatedWidgets -->
<h3 class="fn"><a name="associatedWidgets"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qwidget.html">QWidget</a></span> *&gt; QAction::<span class="name">associatedWidgets</span> () const</h3>
<p>Returns a list of widgets this action has been added to.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qwidget.html#addAction">QWidget::addAction</a>() and <a href="qaction.html#associatedGraphicsWidgets">associatedGraphicsWidgets</a>().</p>
<!-- @@@associatedWidgets -->
<!-- $$$changed[overload1]$$$changed -->
<h3 class="fn"><a name="changed"></a><span class="type">void</span> QAction::<span class="name">changed</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when an action has changed. If you are only interested in actions in a given widget, you can watch for <a href="qwidget.html#actionEvent">QWidget::actionEvent</a>() sent with an <a href="qevent.html#Type-enum">QEvent::ActionChanged</a>.</p>
<p><b>See also </b><a href="qwidget.html#actionEvent">QWidget::actionEvent</a>().</p>
<!-- @@@changed -->
<!-- $$$data[overload1]$$$data -->
<h3 class="fn"><a name="data"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QAction::<span class="name">data</span> () const</h3>
<p>Returns the user data as set in QAction::setData.</p>
<p><b>See also </b><a href="qaction.html#setData">setData</a>().</p>
<!-- @@@data -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QAction::<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 -->
<!-- $$$hover[overload1]$$$hover -->
<h3 class="fn"><a name="hover"></a><span class="type">void</span> QAction::<span class="name">hover</span> ()<tt> [slot]</tt></h3>
<p>This is a convenience slot that calls activate(Hover).</p>
<!-- @@@hover -->
<!-- $$$hovered[overload1]$$$hovered -->
<h3 class="fn"><a name="hovered"></a><span class="type">void</span> QAction::<span class="name">hovered</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when an action is highlighted by the user; for example, when the user pauses with the cursor over a menu option, toolbar button, or presses an action's shortcut key combination.</p>
<p><b>See also </b><a href="qaction.html#activate">QAction::activate</a>().</p>
<!-- @@@hovered -->
<!-- $$$isSeparator[overload1]$$$isSeparator -->
<h3 class="fn"><a name="isSeparator"></a><span class="type">bool</span> QAction::<span class="name">isSeparator</span> () const</h3>
<p>Returns true if this action is a separator action; otherwise it returns false.</p>
<p><b>See also </b><a href="qaction.html#setSeparator">QAction::setSeparator</a>().</p>
<!-- @@@isSeparator -->
<!-- $$$menu[overload1]$$$menu -->
<h3 class="fn"><a name="menu"></a><span class="type"><a href="qmenu.html">QMenu</a></span> * QAction::<span class="name">menu</span> () const</h3>
<p>Returns the menu contained by this action. Actions that contain menus can be used to create menu items with submenus, or inserted into toolbars to create buttons with popup menus.</p>
<p><b>See also </b><a href="qaction.html#setMenu">setMenu</a>() and <a href="qmenu.html#addAction">QMenu::addAction</a>().</p>
<!-- @@@menu -->
<!-- $$$parentWidget[overload1]$$$parentWidget -->
<h3 class="fn"><a name="parentWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QAction::<span class="name">parentWidget</span> () const</h3>
<p>Returns the parent widget.</p>
<!-- @@@parentWidget -->
<!-- $$$setActionGroup[overload1]$$$setActionGroupQActionGroup* -->
<h3 class="fn"><a name="setActionGroup"></a><span class="type">void</span> QAction::<span class="name">setActionGroup</span> ( <span class="type"><a href="qactiongroup.html">QActionGroup</a></span> * <i>group</i> )</h3>
<p>Sets this action group to <i>group</i>. The action will be automatically added to the group's list of actions.</p>
<p>Actions within the group will be mutually exclusive.</p>
<p><b>See also </b><a href="qactiongroup.html">QActionGroup</a> and <a href="qaction.html#actionGroup">QAction::actionGroup</a>().</p>
<!-- @@@setActionGroup -->
<!-- $$$setData[overload1]$$$setDataconstQVariant& -->
<h3 class="fn"><a name="setData"></a><span class="type">void</span> QAction::<span class="name">setData</span> ( const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>userData</i> )</h3>
<p>Sets the action's internal data to the given <i>userData</i>.</p>
<p><b>See also </b><a href="qaction.html#data">data</a>().</p>
<!-- @@@setData -->
<!-- $$$setDisabled[overload1]$$$setDisabledbool -->
<h3 class="fn"><a name="setDisabled"></a><span class="type">void</span> QAction::<span class="name">setDisabled</span> ( <span class="type">bool</span> <i>b</i> )<tt> [slot]</tt></h3>
<p>This is a convenience function for the <a href="qaction.html#enabled-prop">enabled</a> property, that is useful for signals--slots connections. If <i>b</i> is true the action is disabled; otherwise it is enabled.</p>
<!-- @@@setDisabled -->
<!-- $$$setMenu[overload1]$$$setMenuQMenu* -->
<h3 class="fn"><a name="setMenu"></a><span class="type">void</span> QAction::<span class="name">setMenu</span> ( <span class="type"><a href="qmenu.html">QMenu</a></span> * <i>menu</i> )</h3>
<p>Sets the menu contained by this action to the specified <i>menu</i>.</p>
<p><b>See also </b><a href="qaction.html#menu">menu</a>().</p>
<!-- @@@setMenu -->
<!-- $$$setSeparator[overload1]$$$setSeparatorbool -->
<h3 class="fn"><a name="setSeparator"></a><span class="type">void</span> QAction::<span class="name">setSeparator</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>If <i>b</i> is true then this action will be considered a separator.</p>
<p>How a separator is represented depends on the widget it is inserted into. Under most circumstances the text, submenu, and icon will be ignored for separator actions.</p>
<p><b>See also </b><a href="qaction.html#isSeparator">QAction::isSeparator</a>().</p>
<!-- @@@setSeparator -->
<!-- $$$setShortcuts[overload1]$$$setShortcutsconstQList<QKeySequence>& -->
<h3 class="fn"><a name="setShortcuts"></a><span class="type">void</span> QAction::<span class="name">setShortcuts</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qkeysequence.html">QKeySequence</a></span>&gt; &amp; <i>shortcuts</i> )</h3>
<p>Sets <i>shortcuts</i> as the list of shortcuts that trigger the action. The first element of the list is the primary shortcut.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qaction.html#shortcuts">shortcuts</a>() and <a href="qaction.html#shortcut-prop">shortcut</a>.</p>
<!-- @@@setShortcuts -->
<!-- $$$setShortcuts$$$setShortcutsQKeySequence::StandardKey -->
<h3 class="fn"><a name="setShortcuts-2"></a><span class="type">void</span> QAction::<span class="name">setShortcuts</span> ( <span class="type"><a href="qkeysequence.html#StandardKey-enum">QKeySequence::StandardKey</a></span> <i>key</i> )</h3>
<p>Sets a platform dependent list of shortcuts based on the <i>key</i>. The result of calling this function will depend on the currently running platform. Note that more than one shortcut can assigned by this action. If only the primary shortcut is required, use setShortcut instead.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qkeysequence.html#keyBindings">QKeySequence::keyBindings</a>().</p>
<!-- @@@setShortcuts -->
<!-- $$$shortcuts[overload1]$$$shortcuts -->
<h3 class="fn"><a name="shortcuts"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qkeysequence.html">QKeySequence</a></span>&gt; QAction::<span class="name">shortcuts</span> () const</h3>
<p>Returns the list of shortcuts, with the primary shortcut as the first element of the list.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qaction.html#setShortcuts">setShortcuts</a>().</p>
<!-- @@@shortcuts -->
<!-- $$$showStatusText[overload1]$$$showStatusTextQWidget* -->
<h3 class="fn"><a name="showStatusText"></a><span class="type">bool</span> QAction::<span class="name">showStatusText</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> = 0 )</h3>
<p>Updates the relevant status bar for the <i>widget</i> specified by sending a <a href="qstatustipevent.html">QStatusTipEvent</a> to its parent widget. Returns true if an event was sent; otherwise returns false.</p>
<p>If a null widget is specified, the event is sent to the action's parent.</p>
<p><b>See also </b><a href="qaction.html#statusTip-prop">statusTip</a>.</p>
<!-- @@@showStatusText -->
<!-- $$$toggle[overload1]$$$toggle -->
<h3 class="fn"><a name="toggle"></a><span class="type">void</span> QAction::<span class="name">toggle</span> ()<tt> [slot]</tt></h3>
<p>This is a convenience function for the <a href="qaction.html#checked-prop">checked</a> property. Connect to it to change the checked state to its opposite state.</p>
<!-- @@@toggle -->
<!-- $$$toggled[overload1]$$$toggledbool -->
<h3 class="fn"><a name="toggled"></a><span class="type">void</span> QAction::<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 action changes its <a href="qaction.html#checked-prop">isChecked</a>() status. This can be the result of a user interaction, or because <a href="qaction.html#checked-prop">setChecked</a>() was called.</p>
<p><i>checked</i> is true if the action is checked, or false if the action is unchecked.</p>
<p><b>See also </b><a href="qaction.html#activate">QAction::activate</a>(), <a href="qaction.html#triggered">QAction::triggered</a>(), and <a href="qaction.html#checked-prop">checked</a>.</p>
<!-- @@@toggled -->
<!-- $$$trigger[overload1]$$$trigger -->
<h3 class="fn"><a name="trigger"></a><span class="type">void</span> QAction::<span class="name">trigger</span> ()<tt> [slot]</tt></h3>
<p>This is a convenience slot that calls activate(Trigger).</p>
<!-- @@@trigger -->
<!-- $$$triggered[overload1]$$$triggeredbool -->
<h3 class="fn"><a name="triggered"></a><span class="type">void</span> QAction::<span class="name">triggered</span> ( <span class="type">bool</span> <i>checked</i> = false )<tt> [signal]</tt></h3>
<p>This signal is emitted when an action is activated by the user; for example, when the user clicks a menu option, toolbar button, or presses an action's shortcut key combination, or when <a href="qaction.html#trigger">trigger</a>() was called. Notably, it is <i>not</i> emitted when <a href="qaction.html#checked-prop">setChecked</a>() or <a href="qaction.html#toggle">toggle</a>() is called.</p>
<p>If the action is checkable, <i>checked</i> is true if the action is checked, or false if the action is unchecked.</p>
<p><b>See also </b><a href="qaction.html#activate">QAction::activate</a>(), <a href="qaction.html#toggled">QAction::toggled</a>(), and <a href="qaction.html#checked-prop">checked</a>.</p>
<!-- @@@triggered -->
</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>