title: How can add action with QWidget.addAction()?
body: <p>In Qt, I want to add some actions in a widget using <code>QWidget.addAction()</code>.
  I can easily do it with <code>QToolBar.addAction()</code>, but when I use <code>QWidget.addAction()</code>, it doesn't work.</p>
  
  <p>How can I use <code>QWidget.addAction()</code>?</p>
  
  <p>Here is my function:</p>
  
  <pre><code>void Reb::addActionToBar(QString *tabName, QAction *action)
  {
      //if tab exist, just add the action, else:
  
      tab_widget-&gt;addTab(new QWidget(), *tabName);
      for(int i = 0 ; i &lt;= tab_widget-&gt;count() ; i++) {
          if(tab_widget-&gt;tabText(i) == tabName) {
              action.setParent(tab_widget-&gt;widget(i));
              tab_widget-&gt;widget(i)-&gt;addAction(action);
          }
      }
  }
  </code></pre>
  
  <p>And as you know tab_widget is a QTabWidget...
  I have no error but i can't see my action in tab.</p>